fix bug with non-event model

This commit is contained in:
AlanCoding
2018-03-16 14:27:36 -04:00
parent 85a95c8cb8
commit bbbb7def0a
2 changed files with 18 additions and 1 deletions

View File

@@ -930,7 +930,11 @@ class UnifiedJob(PolymorphicModel, PasswordFieldsModel, CommonModelNameNotUnique
'''
if self.status in ACTIVE_STATES:
return False # tally of events is only available at end of run
return self.emitted_events == self.get_event_queryset().count()
try:
event_qs = self.get_event_queryset()
except NotImplementedError:
return True # Model without events, such as WFJT
return self.emitted_events == event_qs.count()
def result_stdout_raw_handle(self, enforce_max_bytes=True):
"""