mirror of
https://github.com/ansible/awx.git
synced 2026-02-23 14:05:59 -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
|
||||
|
||||
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
|
||||
if org is None or org.max_hosts == 0:
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user