From 5129048c41d3ac8cc6aafd5bbc7d12a1bcc67f2c Mon Sep 17 00:00:00 2001
From: Wouter Deconinck <wdconinc@gmail.com>
Date: Sun, 4 Feb 2024 09:52:43 -0600
Subject: [PATCH] fix: split comma-separated string into list of dict

---
 DDG4/python/DDSim/Helper/Action.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/DDG4/python/DDSim/Helper/Action.py b/DDG4/python/DDSim/Helper/Action.py
index 108b29e13..ec6fc8cc6 100644
--- a/DDG4/python/DDSim/Helper/Action.py
+++ b/DDG4/python/DDSim/Helper/Action.py
@@ -138,7 +138,7 @@ On the command line, these can be specified as JSON strings.
       try:
         val = json.loads(val)
       except ValueError:
-        val = tuple(val.split(","))
+        val = [dict(name=v) for v in val.split(",")]
     if isinstance(val, tuple):
       # assumes: ( "Geant4TestEventAction", {"Property_int": 10} )
       # creates: { "name": "Geant4TestEventAction", "parameter": {"Property_int": 10} }
-- 
GitLab