From dfec286bed4baf1d587bafb9e4d6bfb4f54080da Mon Sep 17 00:00:00 2001 From: AlanCoding Date: Fri, 20 May 2016 15:30:58 -0400 Subject: [PATCH] All non-superusers to create prompted JTs --- awx/main/access.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/awx/main/access.py b/awx/main/access.py index 42c9a5c1e7..cec0b7c2bf 100644 --- a/awx/main/access.py +++ b/awx/main/access.py @@ -772,7 +772,7 @@ class JobTemplateAccess(BaseAccess): # Check that the given inventory ID is valid. inventory_pk = get_pk_from_dict(data, 'inventory') inventory = Inventory.objects.filter(id=inventory_pk) - if not inventory.exists(): + if not inventory.exists() and not data.get('ask_inventory_on_launch', False): return False # Does this make sense? Maybe should check read access project_pk = get_pk_from_dict(data, 'project')