Fix DELETE 500 KeyError due to eventless model events (#14172)

This commit is contained in:
Alan Rominger 2023-07-05 15:37:52 -04:00 committed by GitHub
parent 5e9d514e5e
commit 82abd18927
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -661,7 +661,11 @@ class WorkflowJob(UnifiedJob, WorkflowJobOptions, SurveyJobMixin, JobNotificatio
@property
def event_processing_finished(self):
return True
return True # workflow jobs do not have events
@property
def has_unpartitioned_events(self):
return False # workflow jobs do not have events
def _get_parent_field_name(self):
if self.job_template_id:
@ -914,7 +918,11 @@ class WorkflowApproval(UnifiedJob, JobNotificationMixin):
@property
def event_processing_finished(self):
return True
return True # approval jobs do not have events
@property
def has_unpartitioned_events(self):
return False # approval jobs do not have events
def send_approval_notification(self, approval_status):
from awx.main.tasks.system import send_notifications # avoid circular import