Skip to content

Commit

Permalink
Update views.py
Browse files Browse the repository at this point in the history
  • Loading branch information
VladIakimenko authored May 31, 2023
1 parent d428cd5 commit 32efdfe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion advertisements/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def get_queryset(self):
user = self.request.user
if user.is_staff:
queryset = Advertisement.objects.all()
elif isinstance(user, AnonymousUser):
elif user.is_anonymous:
queryset = Advertisement.objects.filter(draft=False)
else:
queryset = Advertisement.objects.filter(
Expand Down

0 comments on commit 32efdfe

Please sign in to comment.