title: Update Mongo Document with Pymongo
body: <p>I want to update an existing mongodb document by its ID with pymongo(version 3.0.3). However nothing gets updated with my python code. Does anyone know why..?</p>
  
  <p>Here is the mongodb script I want to run and this works fine from a mongo client, Robomongo. </p>
  
  <pre><code>db.mycollection.update(
    { '_id': ObjectId("55d49338b9796c337c894df3") },
    { $set: { "details.model": "14Q22" } },
    upsert=false
    )
  </code></pre>
  
  <p>However this python code does not work. </p>
  
  <pre><code>client = pymongo.MongoClient("1.1.1.1", 27017)
  db = client.mydb
  
  db.mycollection.update(
    { '_id': "55d49338b9796c337c894df3" },
    { '$set': { "details.model": "14Q22" } },
    upsert=False
    )
  </code></pre>
  
  <p>It returns</p>
  
  <pre><code>{u'n': 0, u'nModified': 0, u'ok': 1, 'updatedExisting': False}
  </code></pre>