Merge branch 'issue-6043' of https://github.com/kylestratis/habitrpg into kylestratis-issue-6043 and remove redundant $and specifier
Conflicts: migrations/mystery_items.js
This commit is contained in:
@@ -24,9 +24,15 @@ var update = {
|
||||
|
||||
if (_id) {
|
||||
// singular (missing items)
|
||||
db.users.update({_id:_id}, update);
|
||||
db.users.update({_id: _id}, update);
|
||||
} else {
|
||||
// multiple (once @ start of event)
|
||||
db.users.update({'purchased.plan.customerId':{$ne:null}}, update, {multi:true});
|
||||
db.users.update({
|
||||
'purchased.plan.customerId': { $ne: null },
|
||||
$or: [
|
||||
{ 'purchased.plan.dateTerminated': { $gte: new Date() } },
|
||||
{ 'purchased.plan.dateTerminated': { $exists: false } },
|
||||
{ 'purchased.plan.dateTerminated': { $eq: null } }
|
||||
]
|
||||
}, update, { multi: true });
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user