mirror of
https://github.com/ansible/awx.git
synced 2026-02-26 15:36:04 -03:30
count -> exists
This commit is contained in:
@@ -644,7 +644,7 @@ class ProjectAccess(BaseAccess):
|
|||||||
if self.user.is_superuser:
|
if self.user.is_superuser:
|
||||||
return True
|
return True
|
||||||
qs = Organization.accessible_objects(self.user, ALL_PERMISSIONS)
|
qs = Organization.accessible_objects(self.user, ALL_PERMISSIONS)
|
||||||
return bool(qs.count() > 0)
|
return qs.exists()
|
||||||
|
|
||||||
def can_change(self, obj, data):
|
def can_change(self, obj, data):
|
||||||
if self.user.is_superuser:
|
if self.user.is_superuser:
|
||||||
|
|||||||
Reference in New Issue
Block a user