mirror of
https://github.com/ansible/awx.git
synced 2026-03-11 06:29:31 -02:30
Protect the system from when one attempts to start a job without an inventory
This commit is contained in:
@@ -163,6 +163,7 @@ def update_inventory_computed_fields(inventory_id, should_update_hosts=True):
|
||||
i = Inventory.objects.filter(id=inventory_id)
|
||||
if not i.exists():
|
||||
logger.error("Update Inventory Computed Fields failed due to missing inventory: " + str(inventory_id))
|
||||
return
|
||||
i = i[0]
|
||||
i.update_computed_fields(update_hosts=should_update_hosts)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user