Commit aecc0bf7 authored by Michal Čihař's avatar Michal Čihař

Use already calcualted check counts when available

parent c341e07a
......@@ -992,7 +992,7 @@ class Translation(models.Model, URLMixin):
for check in CHECKS:
if not CHECKS[check].source:
continue
cnt = self.unit_set.count_type(check, self)
cnt = self.get_failing_checks(check)
if cnt > 0:
desc = CHECKS[check].description + (' (%d)' % cnt)
result.append((check, desc))
......@@ -1037,11 +1037,10 @@ class Translation(models.Model, URLMixin):
))
# All checks
allchecks = self.unit_set.count_type('allchecks', self)
if allchecks > 0:
if self.failing_checks > 0:
result.append((
'allchecks',
_('Strings with any failing checks (%d)') % allchecks
_('Strings with any failing checks (%d)') % self.failing_checks
))
# Process specific checks
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment