From aed96fb3651b8476a0be59f59b3aec69bea3306e Mon Sep 17 00:00:00 2001 From: Alan Rominger Date: Mon, 26 Jun 2023 21:41:08 -0400 Subject: [PATCH] Use the proper queryset to filter project update events (#14166) --- awx/api/serializers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/awx/api/serializers.py b/awx/api/serializers.py index 21ce0ed43d..dfa72c802f 100644 --- a/awx/api/serializers.py +++ b/awx/api/serializers.py @@ -1629,8 +1629,8 @@ class ProjectUpdateDetailSerializer(ProjectUpdateSerializer): fields = ('*', 'host_status_counts', 'playbook_counts') def get_playbook_counts(self, obj): - task_count = obj.project_update_events.filter(event='playbook_on_task_start').count() - play_count = obj.project_update_events.filter(event='playbook_on_play_start').count() + task_count = obj.get_event_queryset().filter(event='playbook_on_task_start').count() + play_count = obj.get_event_queryset().filter(event='playbook_on_play_start').count() data = {'play_count': play_count, 'task_count': task_count}