Skip to content

Commit

Permalink
Fix failing api-docs
Browse files Browse the repository at this point in the history
  • Loading branch information
mrchrisadams committed Jul 26, 2023
1 parent 552e085 commit 9aee88e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/greencheck/api/permissions.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class UserManagesHostingProvider(permissions.BasePermission):
def _has_permission(self, request, hp_id):
if request.method in permissions.SAFE_METHODS:
return True
if request.user:
if request.user and request.user.is_authenticated:
return request.user.hosting_providers.filter(id=hp_id).exists()
return False

Expand Down

0 comments on commit 9aee88e

Please sign in to comment.