mirror of
https://github.com/ansible/awx.git
synced 2026-02-27 07:56:06 -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)
|
runtime_extra_vars.pop(variable_key)
|
||||||
|
|
||||||
if default is not None:
|
if default is not None:
|
||||||
# do not add variables that contain an empty string, are not required and are nor present in extra_vars
|
# do not add variables that contain an empty string, are not required and are not present in extra_vars
|
||||||
if default == '' and not survey_element.get('required') and variable_key not in runtime_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
|
continue
|
||||||
|
|
||||||
decrypted_default = default
|
decrypted_default = default
|
||||||
|
|||||||
Reference in New Issue
Block a user