-
Type: Task
-
Resolution: Done
-
Priority: Minor - P4
-
Affects Version/s: 2.7.1
-
Component/s: None
-
Environment:Any - pymongo/collection.py
-
Minor Change
Since I changed the driver from 2.6.3 to 2.7.1 the son_manipulators I wrote to convert objects to dicts are executed after the test whether an _id-field exists in the dict. The result is, that an exception is raised because the object is not converted to a dict yet..
Is there a reason, why the son_manipulators are now executed after the _id-test?
I swapped the lines 381-382 and 384-385 in pymongo/collection.py because that is the easiest way out for me.