Reverted person.sort_name AttributeError fix (e0ce1052c0)

This commit is contained in:
Emanuel Schuetze 2012-11-27 22:54:07 +01:00
parent 29b37dad74
commit a010df5d1f

View File

@ -152,10 +152,7 @@ class Assignment(models.Model, SlideMixin):
participants = []
for candidate in candidates.all():
participants.append(candidate.person)
try:
participants.sort(key=lambda person: person.sort_name)
except AttributeError:
pass
participants.sort(key=lambda person: person.sort_name)
return participants
#return candidates.values_list('person', flat=True)