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