title: MongoDB ignoring $push command wihout errors | Python
body: <p>I have the document with array field and 1st value in it.</p>
  <p>I want to update this document and add the value in array, so I get the document by find_one command and use this code:</p>
  <pre><code>mg[db][collection].update_one(document, {&quot;$push&quot;: {array_field: value} })
  mg.close()
  print(&quot;end&quot;)
  </code></pre>
  <p>So, I can see the &quot;end&quot; print, but when I check mongo I realize that my array still has only 1 value and it wasn't update.</p>
  <p>I tried to make the new array and update document with $set, but same problem break it up</p>
  <p>No errors, what's wrong?</p>
  <p>P.S. all other mongodb methods works fine with all documents except of this array-field</p>
  <p><strong>==========</strong></p>
  <p>Update:</p>
  <p>I have db <strong>&quot;chanlist&quot;</strong> and collection <strong>&quot;channels&quot;</strong> with document:</p>
  <pre><code>{
                  &quot;name&quot;: &quot;FilmNews&quot;,
                  &quot;chat_link&quot;: &quot;filmnewsss&quot;,
                  &quot;chat_id&quot;: 1283929492,
                  &quot;repost_ids&quot;: [1395174524],
  }
  </code></pre>
  <p>I need to add <strong>1351487118</strong> in <strong>&quot;repost_ids&quot;</strong>, so my steps are:</p>
  <pre><code># db = chanlist db
  
  x = db.channels.find_one({&quot;name&quot;: &quot;FilmNews&quot;})
  
  db.channels.update_one(x,  {&quot;$push&quot;: {&quot;repost_ids&quot;: 1351487118 } })
  
  db.close()
  
  print(&quot;check&quot;)
  </code></pre>
  <p>I did it all, seeing &quot;check&quot; print in my console, going to cloud.mongodb.com, updating page and my document still is:</p>
  <pre><code>{
                      &quot;name&quot;: &quot;FilmNews&quot;,
                      &quot;chat_link&quot;: &quot;filmnewsss&quot;,
                      &quot;chat_id&quot;: 1283929492,
                      &quot;repost_ids&quot;: [1395174524],
  }
  </code></pre>
  <p>Its not updated...</p>