From c99e4ea398f4357fd81f0e1e8aa24244ba937f3b Mon Sep 17 00:00:00 2001 From: Wayne Witzel III Date: Wed, 18 May 2016 15:23:41 -0400 Subject: [PATCH] remove copy/paste .all() from Role get_queryset implementations --- awx/api/views.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/awx/api/views.py b/awx/api/views.py index 1736db2932..8601f9f787 100644 --- a/awx/api/views.py +++ b/awx/api/views.py @@ -813,7 +813,7 @@ class OrganizationRolesList(SubListAPIView): def get_queryset(self): po = self.get_parent_object() content_type = ContentType.objects.get_for_model(self.parent_model) - return Role.objects.filter(content_type=content_type, object_id=po.pk).all() + return Role.objects.filter(content_type=content_type, object_id=po.pk) class TeamList(ListCreateAPIView): @@ -1090,7 +1090,7 @@ class ProjectRolesList(SubListAPIView): def get_queryset(self): po = self.get_parent_object() content_type = ContentType.objects.get_for_model(self.parent_model) - return Role.objects.filter(content_type=content_type, object_id=po.pk).all() + return Role.objects.filter(content_type=content_type, object_id=po.pk) class UserList(ListCreateAPIView): @@ -1402,7 +1402,7 @@ class CredentialRolesList(SubListAPIView): def get_queryset(self): po = self.get_parent_object() content_type = ContentType.objects.get_for_model(self.parent_model) - return Role.objects.filter(content_type=content_type, object_id=po.pk).all() + return Role.objects.filter(content_type=content_type, object_id=po.pk) class InventoryScriptList(ListCreateAPIView): @@ -1434,7 +1434,7 @@ class InventoryScriptRolesList(SubListAPIView): def get_queryset(self): po = self.get_parent_object() content_type = ContentType.objects.get_for_model(self.parent_model) - return Role.objects.filter(content_type=content_type, object_id=po.pk).all() + return Role.objects.filter(content_type=content_type, object_id=po.pk) class InventoryList(ListCreateAPIView): @@ -1496,7 +1496,7 @@ class InventoryRolesList(SubListAPIView): def get_queryset(self): po = self.get_parent_object() content_type = ContentType.objects.get_for_model(self.parent_model) - return Role.objects.filter(content_type=content_type, object_id=po.pk).all() + return Role.objects.filter(content_type=content_type, object_id=po.pk) class InventoryJobTemplateList(SubListAPIView): @@ -1843,7 +1843,7 @@ class GroupRolesList(SubListAPIView): def get_queryset(self): po = self.get_parent_object() content_type = ContentType.objects.get_for_model(self.parent_model) - return Role.objects.filter(content_type=content_type, object_id=po.pk).all() + return Role.objects.filter(content_type=content_type, object_id=po.pk) class InventoryGroupsList(SubListCreateAttachDetachAPIView): @@ -2573,7 +2573,7 @@ class JobTemplateRolesList(SubListAPIView): def get_queryset(self): po = self.get_parent_object() content_type = ContentType.objects.get_for_model(self.parent_model) - return Role.objects.filter(content_type=content_type, object_id=po.pk).all() + return Role.objects.filter(content_type=content_type, object_id=po.pk) class SystemJobTemplateList(ListAPIView):