mirror of
https://github.com/ansible/awx.git
synced 2026-02-22 05:30:18 -03:30
Deal with the (erroneous) case where a job is missing the inventory
by bailing out of check_org_host_limit early. Validation catches this situation later on.
This commit is contained in:
@@ -336,6 +336,9 @@ class BaseAccess(object):
|
|||||||
return
|
return
|
||||||
|
|
||||||
inventory = get_object_from_data('inventory', Inventory, data)
|
inventory = get_object_from_data('inventory', Inventory, data)
|
||||||
|
if inventory is None: # In this case a missing inventory error is launched
|
||||||
|
return # further down the line, so just ignore it.
|
||||||
|
|
||||||
org = inventory.organization
|
org = inventory.organization
|
||||||
if org is None or org.max_hosts == 0:
|
if org is None or org.max_hosts == 0:
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user