mirror of
https://github.com/ansible/awx.git
synced 2026-05-07 09:27:36 -02:30
Merge pull request #577 from ryanpetrello/release_3.2.2
render survey_spec for display purposes in a safe manner
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
# Python
|
# Python
|
||||||
import json
|
import json
|
||||||
from copy import copy
|
from copy import copy, deepcopy
|
||||||
|
|
||||||
# Django
|
# Django
|
||||||
from django.db import models
|
from django.db import models
|
||||||
@@ -257,7 +257,7 @@ class SurveyJobTemplateMixin(models.Model):
|
|||||||
'''
|
'''
|
||||||
Hide encrypted default passwords in survey specs
|
Hide encrypted default passwords in survey specs
|
||||||
'''
|
'''
|
||||||
survey_spec = self.survey_spec.copy() if self.survey_spec else {}
|
survey_spec = deepcopy(self.survey_spec) if self.survey_spec else {}
|
||||||
for field in survey_spec.get('spec', []):
|
for field in survey_spec.get('spec', []):
|
||||||
if field.get('type') == 'password':
|
if field.get('type') == 'password':
|
||||||
if 'default' in field and field['default']:
|
if 'default' in field and field['default']:
|
||||||
|
|||||||
Reference in New Issue
Block a user