Skip to content

Commit

Permalink
fix: allow dict without parameter key
Browse files Browse the repository at this point in the history
  • Loading branch information
wdconinc authored Feb 5, 2024
1 parent 74719e2 commit 028c796
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions DDG4/python/DDSim/DD4hepSimulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -357,8 +357,9 @@ def run(self):
(self.action.stack, DDG4.StackingAction, kernel.stackingAction)]:
for action_dict in action_list:
action = DDG4_Action(kernel, action_dict["name"])
for parameter, value in action_dict['parameter'].items():
setattr(action, parameter, value)
if 'parameter' in action_dict.keys():
for parameter, value in action_dict['parameter'].items():
setattr(action, parameter, value)
kernel_Action().add(action)

# ----------------------------------------------------------------------------------
Expand Down

0 comments on commit 028c796

Please sign in to comment.