mirror of
https://github.com/ansible/awx.git
synced 2026-03-06 19:21:06 -03:30
Fix a bug where I wasn't checking for the right element in a survey when
launching a job
This commit is contained in:
@@ -214,8 +214,8 @@ class JobTemplate(UnifiedJobTemplate, JobOptions):
|
||||
@property
|
||||
def variables_needed_to_start(self):
|
||||
vars = []
|
||||
if self.survey_enabled:
|
||||
for survey_element in self.survey_spec["spec"]:
|
||||
if self.survey_enabled and 'spec' in self.survey_spec:
|
||||
for survey_element in self.survey_spec['spec']:
|
||||
if survey_element['required']:
|
||||
vars.append(survey_element['variable'])
|
||||
return vars
|
||||
|
||||
Reference in New Issue
Block a user