Only save job_created field on JobEvent for the time being

* Once other job event tables are migrated, remove this
This commit is contained in:
Jim Ladd
2021-06-04 09:17:06 -07:00
parent 1af1a5e9da
commit 0cb2d79889
+4
View File
@@ -437,6 +437,10 @@ class BasePlaybookEvent(CreatedModifiedModel):
sanitize_event_keys(kwargs, cls.VALID_KEYS)
workflow_job_id = kwargs.pop('workflow_job_id', None)
# TODO: remove once we convert _all_ jobevent tables to
# the new partioned format
if cls is not JobEvent and 'job_created' in kwargs:
del kwargs['job_created']
event = cls(**kwargs)
if workflow_job_id:
setattr(event, 'workflow_job_id', workflow_job_id)