mirror of
https://github.com/ansible/awx.git
synced 2026-01-17 12:41:19 -03:30
Resolve extra vars display mix-up with passworded survey questions.
This commit is contained in:
parent
0991e213cc
commit
60b7309c08
@ -746,9 +746,14 @@ class Job(UnifiedJob, JobOptions):
|
||||
Hides fields marked as passwords in survey.
|
||||
'''
|
||||
if self.survey_passwords:
|
||||
extra_vars = json.loads(self.extra_vars)
|
||||
extra_vars.update(self.survey_passwords)
|
||||
return json.dumps(extra_vars)
|
||||
try:
|
||||
extra_vars = json.loads(self.extra_vars)
|
||||
for key, value in self.survey_passwords.items():
|
||||
if key in extra_vars:
|
||||
extra_vars[key] = value
|
||||
return json.dumps(extra_vars)
|
||||
except ValueError:
|
||||
pass
|
||||
else:
|
||||
return self.extra_vars
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user