block user from entering encrypted as bare default

This commit is contained in:
AlanCoding
2017-12-01 13:19:56 -05:00
parent 8d162f9044
commit 47f45bf9b3
3 changed files with 173 additions and 18 deletions

View File

@@ -245,6 +245,17 @@ class SurveyJobTemplateMixin(models.Model):
choice_list))
return errors
@staticmethod
def pivot_spec(spec):
'''
Utility method that will return a dictionary keyed off variable names
'''
pivoted = {}
for element_data in spec.get('spec', []):
if 'variable' in element_data:
pivoted[element_data['variable']] = element_data
return pivoted
def survey_variable_validation(self, data):
errors = []
if not self.survey_enabled: