From ed1b5c5519c6c2da3e92b9bc557d8bb8a0d640f4 Mon Sep 17 00:00:00 2001 From: Peter Braun Date: Tue, 17 Feb 2026 12:19:43 +0100 Subject: [PATCH] exclude password fields from skipping if not defined --- awx/main/models/mixins.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/awx/main/models/mixins.py b/awx/main/models/mixins.py index fcd4f9a334..184b4c7899 100644 --- a/awx/main/models/mixins.py +++ b/awx/main/models/mixins.py @@ -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