summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Rominger <arominge@redhat.com>2023-06-27 03:41:08 +0200
committerGitHub <noreply@github.com>2023-06-27 03:41:08 +0200
commitaed96fb3651b8476a0be59f59b3aec69bea3306e (patch)
treee1f5208bfcdcb91587f40b8a20e396da0f5b6e3d
parentUpgrade Github actions issue labeler to fix 404 errors (#14163) (diff)
downloadawx-aed96fb3651b8476a0be59f59b3aec69bea3306e.tar.xz
awx-aed96fb3651b8476a0be59f59b3aec69bea3306e.zip
Use the proper queryset to filter project update events (#14166)
-rw-r--r--awx/api/serializers.py4
1 files 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}