Closed azaroth42 closed 4 years ago
The fix:
in rdffile.py, in data_walk()
elif branch[0]["cardinality"] != "n":
# Determine if the value is the same as the current value
# If so, then no-op
bnode = result[bnodeid][0]
if node_value == bnode['tile'].data[bnodeid]:
pass
else:
raise ValueError(f"Attempt to add a value to cardinality 1, non-list node {k} {clss}:\n {vi}")
Fixed in v5.
fixed in the latest
Describe the bug
Although the export works as expected when created by hand, if there is a concept-list that has multiple values, and then has a concept with cardinality 1 associated, then the second instance in the concept-list will cause an error, when the import attempts to re-add the same value into the concept.
To Reproduce
Expected behavior
Given discussions and experiments to date, we didn't encounter this issue!
What would be good to happen is that it checks the current values to determine if the value is already there and does not re-add it, and thus does not trigger the error.