diff --git a/openslides/assignment/models.py b/openslides/assignment/models.py index b70972234..c208592c4 100644 --- a/openslides/assignment/models.py +++ b/openslides/assignment/models.py @@ -160,7 +160,10 @@ class Assignment(models.Model, SlideMixin): participants = [] for candidate in candidates.all(): participants.append(candidate.person) - participants.sort(key=lambda person: person.sort_name) + try: + participants.sort(key=lambda person: person.sort_name) + except AttributeError: + pass return participants #return candidates.values_list('person', flat=True)