Silently return if there isn't valid json passed in as extra data fields

This commit is contained in:
Matthew Jones 2014-10-01 13:00:06 -04:00
parent 8848cbfa1e
commit 786cc3fa85

View File

@ -447,7 +447,10 @@ class Job(UnifiedJob, JobOptions):
def handle_extra_data(self, extra_data):
if extra_data == "":
return
evars = json.loads(self.extra_vars)
try:
evars = json.loads(self.extra_vars)
catch Exception, e:
return
evars.update(extra_data)
self.update_fields(extra_vars=json.dumps(evars))