mirror of
https://github.com/ansible/awx.git
synced 2026-01-14 11:20:39 -03:30
Merge pull request #1675 from wwitzel3/fix-879
Bulk update host field to null for JobEvents
This commit is contained in:
commit
538c15141a
@ -548,6 +548,8 @@ def delete_inventory(self, inventory_id, user_id):
|
||||
with ignore_inventory_computed_fields(), ignore_inventory_group_removal(), impersonate(user):
|
||||
try:
|
||||
i = Inventory.objects.get(id=inventory_id)
|
||||
for host in i.hosts.iterator():
|
||||
host.job_events_as_primary_host.update(host=None)
|
||||
i.delete()
|
||||
emit_channel_notification(
|
||||
'inventories-status_changed',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user