mirror of
https://github.com/psycopg/psycopg2.git
synced 2024-11-25 02:13:44 +03:00
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:
parent
63e4bc961e
commit
4058f363d6
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user