Skip to content

Commit

Permalink
Stats: Fix counting comments
Browse files Browse the repository at this point in the history
Fixes #5296
  • Loading branch information
nijel committed Jan 30, 2021
1 parent 9b030ec commit d9f3c16
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion weblate/utils/stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ def _prefetch_basic(self):
Length("source"), state__gte=STATE_APPROVED, suggestion_count__gt=0
),
# Comments
comments=conditional_sum("id", comment_count__gt=0),
comments=conditional_sum(1, comment_count__gt=0),
comments_words=conditional_sum("num_words", comment_count__gt=0),
comments_chars=conditional_sum(Length("source"), comment_count__gt=0),
)
Expand Down

0 comments on commit d9f3c16

Please sign in to comment.