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

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

    XMLWordPrintableJSON

Details

    • Task
    • Status: Closed
    • Minor - P4
    • Resolution: Fixed
    • 2.7.1
    • 2.7.2, 3.0
    • None
    • Any - pymongo/collection.py
    • Minor Change

    Description

      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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: