mirror of
https://github.com/ansible/awx.git
synced 2026-05-07 01:17:37 -02:30
addressing review comments
This commit is contained in:
@@ -1383,7 +1383,7 @@ class CredentialOwnerTeamsList(SubListAPIView):
|
|||||||
raise PermissionDenied()
|
raise PermissionDenied()
|
||||||
|
|
||||||
content_type = ContentType.objects.get_for_model(self.model)
|
content_type = ContentType.objects.get_for_model(self.model)
|
||||||
teams = [c.content_object.pk for c in credential.owner_role.parents.filter(content_type=content_type).exclude(object_id__isnull=True)]
|
teams = [c.content_object.pk for c in credential.owner_role.parents.filter(content_type=content_type)]
|
||||||
|
|
||||||
return self.model.objects.filter(pk__in=teams)
|
return self.model.objects.filter(pk__in=teams)
|
||||||
|
|
||||||
@@ -1400,7 +1400,7 @@ class CredentialOwnerOrganizationsList(SubListAPIView):
|
|||||||
raise PermissionDenied()
|
raise PermissionDenied()
|
||||||
|
|
||||||
content_type = ContentType.objects.get_for_model(self.model)
|
content_type = ContentType.objects.get_for_model(self.model)
|
||||||
orgs = [c.content_object.pk for c in credential.owner_role.parents.filter(content_type=content_type).exclude(object_id__isnull=True)]
|
orgs = [c.content_object.pk for c in credential.owner_role.parents.filter(content_type=content_type)]
|
||||||
|
|
||||||
return self.model.objects.filter(pk__in=orgs)
|
return self.model.objects.filter(pk__in=orgs)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user