mirror of
https://github.com/ZwareBear/awx.git
synced 2026-05-05 02:31:46 -05:00
Protect the system from when one attempts to start a job without an inventory
This commit is contained in:
@@ -417,6 +417,8 @@ class Job(UnifiedJob, JobOptions):
|
||||
|
||||
def generate_dependencies(self, active_tasks):
|
||||
from awx.main.models import InventoryUpdate, ProjectUpdate
|
||||
if self.inventory is None or self.project is None:
|
||||
return []
|
||||
inventory_sources = self.inventory.inventory_sources.filter(active=True, update_on_launch=True)
|
||||
project_found = False
|
||||
inventory_sources_found = []
|
||||
|
||||
Reference in New Issue
Block a user