Skip to content

Commit

Permalink
Fix stories API queryset
Browse files Browse the repository at this point in the history
  • Loading branch information
norkans7 committed Apr 17, 2024
1 parent 5676b91 commit 2ab93ea
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ureport/api/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -912,7 +912,9 @@ class StoryList(BaseListAPIView):

serializer_class = StoryReadSerializer
model = Story

def get_queryset(self):
queryset = super().get_queryset()
return queryset.filter(is_active=True).filter(Q(attachment="") | Q(attachment=None))

class StoryDetails(RetrieveAPIView):
"""
Expand Down

0 comments on commit 2ab93ea

Please sign in to comment.