mirror of
https://github.com/ansible/awx.git
synced 2026-03-24 20:35:02 -02:30
Handle the case where the existing extra vars is None
This commit is contained in:
@@ -451,7 +451,10 @@ class Job(UnifiedJob, JobOptions):
|
|||||||
evars = json.loads(self.extra_vars)
|
evars = json.loads(self.extra_vars)
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
return
|
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))
|
self.update_fields(extra_vars=json.dumps(evars))
|
||||||
|
|
||||||
def copy(self):
|
def copy(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user