Skip to content

Commit 5bd572e

Browse files
authored
Merge pull request #4 from clockback/main
Fix method for counting the number of Codes which contain at least one occurrence of the feature.
2 parents 36a3114 + a198c42 commit 5bd572e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

codesurvey/database.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ def save_repo_features(self, repo: Repo, *, keep_code_features: bool):
330330
# Sum of all occurrences in CodeFeatureModels
331331
fn.SUM(self.CodeFeatureModel.occurrence_count),
332332
# Count of all CodeFeatureModels with at least one occurrence
333-
fn.SUM(fn.MAX(self.CodeFeatureModel.occurrence_count, 1)),
333+
fn.SUM(fn.MIN(self.CodeFeatureModel.occurrence_count, 1)),
334334
# Count of all CodeFeatureModels
335335
fn.COUNT(),
336336
)

0 commit comments

Comments
 (0)