Fixed unsupported attempt to index a set

This commit is contained in:
Thomas Patzke
2020-06-28 00:27:33 +02:00
parent 415f826ece
commit 09378b5ebf
+2 -2
View File
@@ -125,9 +125,9 @@ class ConditionalFieldMapping(SimpleFieldMapping):
if len(targets) == 1: # result set contains only one target, return mapped item (like SimpleFieldMapping)
if value is None:
return ConditionNULLValue(val=targets[0])
return ConditionNULLValue(val=list(targets)[0])
else:
return (targets[0], value)
return (list(targets)[0], value)
elif len(targets) > 1: # result set contains multiple targets, return all linked as OR condition (like MultiFieldMapping)
cond = ConditionOR()
for target in targets: