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:
Ryan Petrello
2017-11-13 15:18:09 -05:00
committed by GitHub

View File

@@ -1,6 +1,6 @@
# Python
import json
from copy import copy
from copy import copy, deepcopy
# Django
from django.db import models
@@ -257,7 +257,7 @@ class SurveyJobTemplateMixin(models.Model):
'''
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', []):
if field.get('type') == 'password':
if 'default' in field and field['default']: