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