Handle the case where the existing extra vars is None

This commit is contained in:
Matthew Jones 2014-10-03 10:26:24 -04:00
parent c609f7a81d
commit d3416336ed

View File

@ -451,7 +451,10 @@ class Job(UnifiedJob, JobOptions):
evars = json.loads(self.extra_vars)
except Exception, e:
return
evars.update(extra_data)
if evars is None:
evars = extra_data
else:
evars.update(extra_data)
self.update_fields(extra_vars=json.dumps(evars))
def copy(self):