mirror of
https://github.com/ansible/awx.git
synced 2026-02-17 19:20:05 -03:30
exclude password fields from skipping if not defined
This commit is contained in:
@@ -188,8 +188,14 @@ class SurveyJobTemplateMixin(models.Model):
|
||||
runtime_extra_vars.pop(variable_key)
|
||||
|
||||
if default is not None:
|
||||
# do not add variables that contain an empty string, are not required and are nor present in extra_vars
|
||||
if default == '' and not survey_element.get('required') and variable_key not in runtime_extra_vars:
|
||||
# do not add variables that contain an empty string, are not required and are not present in extra_vars
|
||||
# password fields must be skipped, because default values have special behaviour
|
||||
if (
|
||||
default == ''
|
||||
and not survey_element.get('required')
|
||||
and survey_element.get('type') != 'password'
|
||||
and variable_key not in runtime_extra_vars
|
||||
):
|
||||
continue
|
||||
|
||||
decrypted_default = default
|
||||
|
||||
Reference in New Issue
Block a user