Merge pull request #135 from chrismeyersfsu/fix-cancel_job_template_with_survey

job cancelation of job templates with surveys wont send extra_vars so don't expect them to
This commit is contained in:
Chris Meyers 2015-04-13 19:44:28 -04:00
commit d21d3ee191

View File

@ -1472,7 +1472,7 @@ class JobSerializer(UnifiedJobSerializer, JobOptionsSerializer):
ret['job_template'] = None
if obj.job_template and obj.job_template.survey_enabled:
if ret['extra_vars']:
if 'extra_vars' in ret:
try:
extra_vars = json.loads(ret['extra_vars'])
for key in obj.job_template.survey_password_variables():