diff --git a/awx/api/filters.py b/awx/api/filters.py index e296019e75..eaec6628ef 100644 --- a/awx/api/filters.py +++ b/awx/api/filters.py @@ -157,7 +157,7 @@ class FieldLookupBackend(BaseFilterBackend): # A list of fields that we know can be filtered on without the possiblity # of introducing duplicates - NO_DUPLICATES_ALLOW_LIST = (CharField, IntegerField, BooleanField) + NO_DUPLICATES_ALLOW_LIST = (CharField, IntegerField, BooleanField, TextField) def get_fields_from_lookup(self, model, lookup): diff --git a/awx/api/views/__init__.py b/awx/api/views/__init__.py index f67ab6622d..f6b7fbbabe 100644 --- a/awx/api/views/__init__.py +++ b/awx/api/views/__init__.py @@ -3839,7 +3839,7 @@ class JobJobEventsList(BaseJobEventsList): def get_queryset(self): job = self.get_parent_object() self.check_parent_access(job) - return job.get_event_queryset().select_related('host').order_by('start_line') + return job.get_event_queryset().prefetch_related('job__job_template', 'host').order_by('start_line') class JobJobEventsChildrenSummary(APIView):