Merge pull request #2026 from normanjaeckel/FixAgenda

Fixed TypeError in agenda views. Fixed #2023.
This commit is contained in:
Emanuel Schütze 2016-03-03 08:45:33 +01:00
commit f3e59d3d04

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):