From 79723cea2128744b49c733cf0ffddfd43f7d4925 Mon Sep 17 00:00:00 2001 From: Ryan Petrello Date: Mon, 29 Jul 2019 09:35:19 -0400 Subject: [PATCH] skip events w/ empty stdout when generating stdout downloads see: https://github.com/ansible/tower/issues/3677 --- awx/main/models/unified_jobs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/awx/main/models/unified_jobs.py b/awx/main/models/unified_jobs.py index f2831087d3..b9b6ecc092 100644 --- a/awx/main/models/unified_jobs.py +++ b/awx/main/models/unified_jobs.py @@ -1031,7 +1031,7 @@ class UnifiedJob(PolymorphicModel, PasswordFieldsModel, CommonModelNameNotUnique fd.write = lambda s: _write(smart_text(s)) cursor.copy_expert( - "copy (select stdout from {} where {}={} order by start_line) to stdout".format( + "copy (select stdout from {} where {}={} and stdout != '' order by start_line) to stdout".format( self._meta.db_table + 'event', self.event_parent_key, self.id