Commit 5c9ae9cb by Kálmán Viktor

dashboard: make check more pythonic

parent beeed7fa
......@@ -299,7 +299,7 @@ class ProfileView(LoginRequiredMixin, DetailView):
# if the intersection of the 2 lists is empty the logged in user
# has no permission to check the target's profile
# (except if the user want to see his own profile)
if len(intersection) < 1 and target != user and not user.is_superuser:
if not intersection and target != user and not user.is_superuser:
raise PermissionDenied
return super(ProfileView, self).get(*args, **kwargs)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment