mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-07-13 07:18:38 +00:00
Changed Mongo query to check DateTerminated to prevent accumulation of mystery items when subscription is ended.
This commit is contained in:
parent
bcc522f08d
commit
b75f044d07
1 changed files with 1 additions and 1 deletions
|
|
@ -27,6 +27,6 @@ if (_id) {
|
|||
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({$and: [{'purchased.plan.customerId':{$ne:null}},{$or: [{'purchased.plan.dateTerminated':{$gte:new Date()}},{'purchased.plan.dateTerminated':{$eq:null}}]}]}, update, {multi:true});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue