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

XMLWordPrintableJSON

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

      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:
            Michael Dirolf (Inactive)
            Reporter:
            Nick Leippe
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: