mirror of
https://github.com/ansible/awx.git
synced 2026-03-04 02:01:01 -03:30
Do not cascade delete job_events
* want to drop job_event _partitions_
.. instead of having the job events associated with a job
automatically get cleaned up for us
This commit is contained in:
@@ -114,4 +114,9 @@ class Migration(migrations.Migration):
|
||||
name='job_created',
|
||||
field=models.DateTimeField(null=True, editable=False),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='jobevent',
|
||||
name='job',
|
||||
field=models.ForeignKey(editable=False, null=True, on_delete=models.deletion.SET_NULL, related_name='job_events', to='main.Job'),
|
||||
),
|
||||
]
|
||||
|
||||
@@ -476,7 +476,8 @@ class JobEvent(BasePlaybookEvent):
|
||||
job = models.ForeignKey(
|
||||
'Job',
|
||||
related_name='job_events',
|
||||
on_delete=models.CASCADE,
|
||||
null=True,
|
||||
on_delete=models.SET_NULL,
|
||||
editable=False,
|
||||
)
|
||||
host = models.ForeignKey(
|
||||
|
||||
Reference in New Issue
Block a user