Add a conditional judgement to avoid invalid dict index
Before index the job_configs by key 'args', we add a judgement to see whether key 'args' exists. Closes-Bug: #1456171 Change-Id: I42fa4bfe5d2b9a90833bae25bd9ac44c614fd9ce
This commit is contained in:
parent
bbd0f2f8f2
commit
7fe5c80143
@ -187,8 +187,10 @@ class JobConfigAction(workflows.Action):
|
||||
if 'params' in job_configs:
|
||||
self.fields['job_params'].initial = (
|
||||
json.dumps(job_configs['params']))
|
||||
job_args = json.dumps(job_configs['args'])
|
||||
self.fields['job_args_array'].initial = job_args
|
||||
|
||||
if 'args' in job_configs:
|
||||
self.fields['job_args_array'].initial = (
|
||||
json.dumps(job_configs['args']))
|
||||
|
||||
if self.MAIN_CLASS in edp_configs:
|
||||
self.fields['main_class'].initial = (
|
||||
|
Loading…
Reference in New Issue
Block a user