Skip to content

Commit 8156605

Browse files
committed
[tools/dictparser] Proper 'values' handling on save
Closes #308
1 parent 7a3a5b0 commit 8156605

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

odml/tools/dict_parser.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,9 @@ def get_properties(props_list):
8484
tag = getattr(prop, attr)
8585
if isinstance(tag, tuple):
8686
prop_dict[attr] = list(tag)
87-
elif (tag == []) or tag: # Even if 'value' is empty, allow '[]'
88-
# Custom odML tuples require special handling
89-
# for save loading from file.
90-
if attr == "value" and prop.dtype and \
87+
elif (tag == []) or tag: # Even if 'values' is empty, allow '[]'
88+
# Custom odML tuples require special handling.
89+
if attr == "values" and prop.dtype and \
9190
prop.dtype.endswith("-tuple") and len(prop.values) > 0:
9291
prop_dict["value"] = "(%s)" % ";".join(prop.values[0])
9392
else:

0 commit comments

Comments
 (0)