mirror of
https://github.com/ansible/awx.git
synced 2026-03-13 23:17:32 -02:30
fix KeyError with spec
This commit is contained in:
@@ -2421,7 +2421,7 @@ class JobTemplateSurveySpec(GenericAPIView):
|
||||
raise LicenseForbids(_('Your license does not allow '
|
||||
'adding surveys.'))
|
||||
survey_spec = obj.survey_spec
|
||||
for pos, field in enumerate(survey_spec['spec']):
|
||||
for pos, field in enumerate(survey_spec.get('spec', [])):
|
||||
if field.get('type') == 'password':
|
||||
if 'default' in field and field['default']:
|
||||
field['default'] = '$encrypted$'
|
||||
|
||||
Reference in New Issue
Block a user