Skip to content

Commit a198c42

Browse files
authored
Update database.py
Fixing method for counting the number of Codes which contain at least one occurrence of the feature.
1 parent 36a3114 commit a198c42

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)