Skip to content

Commit

Permalink
Update guardian/utils.py
Browse files Browse the repository at this point in the history
Co-authored-by: Michael K. <michael-k@users.noreply.github.com>
  • Loading branch information
2 people authored and ad-m committed Sep 18, 2020
1 parent e6d1664 commit 2606072
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions guardian/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,10 @@ def get_40x_or_None(request, perms, obj=None, login_url=None,
if not has_permissions:
if any_perm:
has_permissions = any(request.user.has_perm(perm, obj)
for perm in perms)
for perm in perms)
else:
has_permissions = all(request.user.has_perm(perm, obj)
for perm in perms)
for perm in perms)

if not has_permissions:
if return_403:
Expand Down

0 comments on commit 2606072

Please sign in to comment.