title: Update query adding ObjectIDs to array twice
body: <p>I am working on a table planner application where guests can be assigned to tables. The table model has the following Schema:</p>
  
  <pre><code>const mongoose = require('mongoose');
  
  mongoose.Promise = global.Promise;
  
  const tableSchema = new mongoose.Schema({
    name: {
      type: String,
      required: 'Please provide the name of the table',
      trim: true,
    },
    capacity: {
      type: Number,
      required: 'Please provide the capacity of the table',
    },
    guests: [{
      type: mongoose.Schema.Types.ObjectId,
      ref: 'Guest',
    }],
  });
  
  module.exports = mongoose.model('Table', tableSchema);
  </code></pre>
  
  <p>Guests can be dragged and dropped in the App (using React DND) to "Table" React components. Upon being dropped on a table, an Axios POST request is made to a Node.js method to update the Database and add the guest's Object ID to an array within the Table model:</p>
  
  <pre><code>exports.updateTableGuests = async (req, res) =&gt; {
    console.log(req.body.guestId);
    await Table.findOneAndUpdate(
      { name: req.body.tablename },
      { $push: { guests: req.body.guestId } },
      { safe: true, upsert: true },
      (err) =&gt; {
        if (err) {
          console.log(err);
        } else {
        // do stuff
        }
      },
    );
    res.send('back');
  };
  </code></pre>
  
  <p>This is working as expected, except that with each dropped guest, the Table model's guests array is updated with the same guest Object ID twice? Does anyone know why this would be?</p>
  
  <p>I have tried logging the <code>req.body.guestID</code> to ensure that it is a single value and also to check that this function is not being called twice. But neither of those tests brought unexpected results. I therefore suspect something is wrong with my <code>findOneAndUpdate</code> query?</p>