Skip to content

Commit

Permalink
BF: Handle when value in DictCtrl has a syntax error
Browse files Browse the repository at this point in the history
  • Loading branch information
TEParsons committed Aug 8, 2022
1 parent a7d2f39 commit 60cf0ce
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion psychopy/app/builder/dialogs/paramCtrls.py
Original file line number Diff line number Diff line change
Expand Up @@ -643,7 +643,9 @@ def __init__(self, parent,
if isinstance(val, dict):
newVal = []
for key, v in val.items():
newVal.append({'Field': key, 'Default': v.val})
if hasattr(v, "val"):
v = v.val
newVal.append({'Field': key, 'Default': v})
val = newVal
# If any items within the list are not dicts or are dicts longer than 1, throw error
if not all(isinstance(v, dict) and len(v) == 2 for v in val):
Expand Down

0 comments on commit 60cf0ce

Please sign in to comment.