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

findandmodify raises pymongo.errors.OperationFailure when there are no matches

    • Type: Icon: Bug Bug
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Environment:
      ubuntu 10.4

      File "build/bdist.linux-x86_64/egg/pymongo/database.py", line 294, in command
      pymongo.errors.OperationFailure: command SON([('findandmodify', 'device_event_log_queue'), ('sort',

      {'_id': -1}

      ), ('query', {'started': {'$exists': False}}), ('update', {'$set': {'started': 1280965374}})]) failed: No matching object found

      If there are no matches, it should return an empty result, not raise an exception.

            Assignee:
            mike Michael Dirolf
            Reporter:
            nick@leippe.com Nick Leippe
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: