change $push to $addToSet for monthly mystery items so that we can't get duplicates being added. Ref: https://gist.github.com/lefnire/a0a93c52211f44a2c087 and http://stackoverflow.com/questions/27248556/mongodb-difference-between-push-addtoset
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
var _id = '';
|
||||
var update = {
|
||||
$push: {
|
||||
$addToSet: {
|
||||
'purchased.plan.mysteryItems':{
|
||||
$each:['armor_mystery_201504','back_mystery_201504']
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user