Uploaded image for project: 'Python Driver'
  1. Python Driver
  2. PYTHON-709

Why is missing '_id'-field fix early now?

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 2.7.2, 3.0
    • Affects Version/s: 2.7.1
    • Component/s: None
    • Labels:
    • 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.

            Assignee:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Reporter:
            fahrradfahrer Stefan Klinke
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: