Needs fix to group candidates by user.
This commit is contained in:
parent
0b17ab10fe
commit
f412e9065a
@ -72,6 +72,7 @@ class Assignment(models.Model):
|
|||||||
# list of candidates
|
# list of candidates
|
||||||
from poll.models import Option
|
from poll.models import Option
|
||||||
candidates = []
|
candidates = []
|
||||||
|
#for option in Option.objects.values('user__user__profile').filter(poll__assignment=self).order_by('user__user__first_name').distinct():
|
||||||
for option in Option.objects.filter(poll__assignment=self).order_by('user__user__first_name'):
|
for option in Option.objects.filter(poll__assignment=self).order_by('user__user__first_name'):
|
||||||
candidates.append(option.value)
|
candidates.append(option.value)
|
||||||
return candidates
|
return candidates
|
||||||
|
Loading…
Reference in New Issue
Block a user