mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-04-14 19:56:23 +00:00
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:
commit
7bf5300369
1 changed files with 9 additions and 3 deletions
|
|
@ -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 });
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue