Fixed TypeError in agenda views. Fixed #2023.

This commit is contained in:
Norman Jäckel 2016-03-03 00:23:41 +01:00
parent 6799cab940
commit 7da48efd4c

View File

@ -68,11 +68,10 @@ class ItemViewSet(ListModelMixin, RetrieveModelMixin, UpdateModelMixin, GenericV
"""
Filters organizational items if the user has no permission to see them.
"""
queryset = super().get_queryset()
if self.request.user.has_perm('agenda.can_see_hidden_items'):
return queryset
return super().get_queryset()
else:
return Item.objects.get_only_agenda_items(queryset)
return Item.objects.get_only_agenda_items()
@detail_route(methods=['POST', 'DELETE'])
def manage_speaker(self, request, pk=None):