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:
Alys 2015-05-23 20:03:36 +10:00
parent a07f8572b0
commit 68c4547c0a

View file

@ -1,6 +1,6 @@
var _id = '';
var update = {
$push: {
$addToSet: {
'purchased.plan.mysteryItems':{
$each:['armor_mystery_201504','back_mystery_201504']
}