More robust RealDictRow population

In the presence of repeated columns the mapping would have remained into
into the dictionary. Now it is removed.

Fix #884
This commit is contained in:
Daniele Varrazzo 2019-04-06 21:17:28 +01:00
parent 63e4bc961e
commit 4058f363d6

View File

@ -280,7 +280,7 @@ class RealDictRow(OrderedDict):
# We are in the row building phase
mapping = self[RealDictRow]
super(RealDictRow, self).__setitem__(mapping[key], value)
if len(self) == len(mapping) + 1:
if key == len(mapping) - 1:
# Row building finished
del self[RealDictRow]
return