mirror of
https://github.com/ZwareBear/awx.git
synced 2026-04-27 10:21:49 -05:00
Return survey_enabled as False for launch endpoint when no survey spec is defined for a job template; allow job template to be launched anyways. Fixes https://trello.com/c/zErQqf1L
This commit is contained in:
@@ -229,7 +229,7 @@ class JobTemplate(UnifiedJobTemplate, JobOptions):
|
||||
errors.append("'name' missing from survey spec")
|
||||
if 'description' not in self.survey_spec:
|
||||
errors.append("'description' missing from survey spec")
|
||||
for survey_element in self.survey_spec["spec"]:
|
||||
for survey_element in self.survey_spec.get("spec", []):
|
||||
if survey_element['variable'] not in data and \
|
||||
survey_element['required']:
|
||||
errors.append("'%s' value missing" % survey_element['variable'])
|
||||
|
||||
Reference in New Issue
Block a user