From 31fe50092180cd534ac931adedb245bedda96010 Mon Sep 17 00:00:00 2001 From: Jim Ladd Date: Tue, 25 May 2021 13:25:36 -0700 Subject: [PATCH] move get_queryset handling to child view --- awx/api/views/__init__.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/awx/api/views/__init__.py b/awx/api/views/__init__.py index 7a6ced3a91..a96ac4508e 100644 --- a/awx/api/views/__init__.py +++ b/awx/api/views/__init__.py @@ -4028,8 +4028,6 @@ class BaseAdHocCommandEventsList(NoTruncateMixin, SubListAPIView): def get_queryset(self): parent = self.get_parent_object() self.check_parent_access(parent) - if isinstance(parent, models.Host): - return super(BaseAdHocCommandEventsList, self).get_queryset() return parent.get_event_queryset() @@ -4037,6 +4035,9 @@ class HostAdHocCommandEventsList(BaseAdHocCommandEventsList): parent_model = models.Host + def get_queryset(self): + return super(BaseAdHocCommandEventsList, self).get_queryset() + # class GroupJobEventsList(BaseJobEventsList): # parent_model = Group