mongodb version 3.0.1
mongoose version 4.0.3
I'm trying to do this:
groupsModel.updateQ({_id:group._id},{
$unset:{"moderators":""},
$set:{"admins":newAdmins}
})
And I'm getting a MongoError from the catch
stating
''$unset' is empty. You must specify a field like so: {$unset: {<field>: ...}}'
But it isn't empty.
moderators
, however, isn't in the schema, which is why I'm trying to remove it.