Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

removed distinct()

  • Loading branch information...
commit 1cd98049831d4dcc7cdabc9c679eb5d0b88aa183 1 parent 1a60f6a
@miclovich miclovich authored
Showing with 5 additions and 5 deletions.
  1. +5 −5 education/reports.py
View
10 education/reports.py
@@ -381,14 +381,14 @@ def reporters(request, district_id=None):
profile = request.user.get_profile()
if profile.is_member_of('Admins') or profile.is_member_of('UNICEF Officials'):
return EmisReporter.objects.exclude(
- connection__in=Blacklist.objects.all().values_list('connection', flat=True),
+ connection__id__in=Blacklist.objects.all().values_list('connection__id', flat=True),
connection__identity__in = getattr(settings, 'MODEM_NUMBERS')
- ).exclude(reporting_location = None).distinct()
+ ).exclude(reporting_location = None)
else:
user_location = get_location(request)
- return EmisReporter.objects.exclude(connection__in=Blacklist.objects.all().values_list('connection', flat=True)).filter(reporting_location__in=\
- user_location.get_descendants(include_self=True)).distinct()
-
+ return EmisReporter.objects.exclude(\
+ connection__id__in=Blacklist.objects.all().values_list('connection__id', flat=True)).\
+ filter(reporting_location__in= user_location.get_descendants(include_self=True))
# time slider based work
def education_responses_bp3(request, dates=None):
Please sign in to comment.
Something went wrong with that request. Please try again.