Skip to content

Commit 3584b3f

Browse files
fixup job_parameters validation conditional
1 parent 2a439ba commit 3584b3f

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

plugins/modules/region_jcl.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -279,10 +279,9 @@ def get_arg_defs(self): # type: () -> dict
279279
defs[DFHRPL]["options"][TOP_DATA_SETS].update({"elements": "data_set_base"})
280280
defs[DFHRPL]["options"][DATA_SETS].update({"elements": "data_set_base"})
281281
self.update_arg_def(defs[APPLID], "qualifier")
282-
if defs.get(JOB_PARAMETERS):
283-
if defs[JOB_PARAMETERS]["options"].get(JOB_NAME):
284-
# If they've provided a job_name we need to validate this too
285-
self.update_arg_def(defs[JOB_PARAMETERS]["options"][JOB_NAME], "qualifier")
282+
if defs.get(JOB_PARAMETERS) and defs[JOB_PARAMETERS]["options"].get(JOB_NAME):
283+
# If they've provided a job_name we need to validate this too
284+
self.update_arg_def(defs[JOB_PARAMETERS]["options"][JOB_NAME], "qualifier")
286285
# Popping sit parameters as these dont need validation and it will complain at arbitary keys.
287286
defs.pop(SIT_PARAMETERS)
288287
return defs

0 commit comments

Comments
 (0)