Commit 33b7d8ce authored by okhin's avatar okhin 🚴

Fixing the statistics block on indexpage #22

parent fb010aba
......@@ -208,7 +208,10 @@ class AddForm(FormView):
operators = sorted([(i['total'],i['operator_ref__name'])
for i in Violation.objects.values('operator_ref__name').filter(activationid='').exclude(state__in=['closed', 'ooscope', 'duplicate']).annotate(total=Count('confirmation'))],
reverse=True)
context['stats'] = [reports, confirms, operators]
context['stats'] = [
(_('Total confirmed reorts'), len([i for i,z in reports if i>0])),
(_('Countries with some confirmed reports'), len([i for i,z in confirms if i>0])),
(_('Operators with some confirmed reports'), len([i for i,z in oprators if i>0]))]
return context
class ViolationsList(ListView):
......
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