Commit 74fc6dfc authored by Okhin's avatar Okhin
Browse files

Let's display all case, even the non-moderated ones

parent e431da0c
......@@ -214,7 +214,7 @@ class ViolationsList(ListView):
context_object_name = 'violations'
def get_queryset(self):
queryset = Violation.objects.filter(activationid='').exclude(old=True)
queryset = Violation.objects.exclude(old=True)
if 'operator' in self.kwargs:
# If i Have operator I have a country
queryset = Violation.objects.filter(activationid='',
......@@ -234,7 +234,7 @@ class ViolationsList(ListView):
context['country'] = self.kwargs['country']
else:
countries = sorted([(i['total'], i['country'])
for i in Violation.objects.values('country').filter(activationid='').exclude(state__in=['duplicate', 'closed']).exclude(old=True).annotate(total=Count('country'))],
for i in Violation.objects.values('country').exclude(state__in=['duplicate', 'closed']).exclude(old=True).annotate(total=Count('country'))],
reverse=True)
countryweights=json.dumps([{'iso2': y, 'w': x} for x, y in countries])
context['countries'] = countries
......
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