Skip to content

Commit

Permalink
get all chats for fetch all request (#364)
Browse files Browse the repository at this point in the history
  • Loading branch information
Pranshu1902 authored Oct 17, 2023
1 parent dd955c9 commit bcf9b6d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ayushma/views/chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def get_queryset(self):
"-created_at"
)

if user.is_superuser and self.action == "list_all":
if user.is_superuser and (self.request.query_params.get('fetch') == "all" or self.action == "list_all"):
return queryset

return queryset.filter(user=user).order_by("-created_at")
Expand Down

0 comments on commit bcf9b6d

Please sign in to comment.