Skip to content

Commit

Permalink
use exists
Browse files Browse the repository at this point in the history
  • Loading branch information
wh1te909 committed Oct 25, 2024
1 parent f94836e commit 5210c2a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions api/tacticalrmm/ee/sso/permissions.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,4 @@

class SSOLoginPerms(permissions.BasePermission):
def has_permission(self, r, view):
connected_apps = SocialAccount.objects.filter(user=r.user)
return len(connected_apps) > 0
return SocialAccount.objects.filter(user=r.user).exists()

0 comments on commit 5210c2a

Please sign in to comment.