From 698085353babf17b61290abb25dce62d302dbd48 Mon Sep 17 00:00:00 2001 From: Wayne Witzel III Date: Thu, 9 Jun 2016 14:47:54 -0400 Subject: [PATCH] addressing review comments --- awx/api/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/awx/api/views.py b/awx/api/views.py index caa61c91d2..10415bf381 100644 --- a/awx/api/views.py +++ b/awx/api/views.py @@ -1383,7 +1383,7 @@ class CredentialOwnerTeamsList(SubListAPIView): raise PermissionDenied() 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) @@ -1400,7 +1400,7 @@ class CredentialOwnerOrganizationsList(SubListAPIView): raise PermissionDenied() 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)