Merge pull request #1796 from overleaf/ta-institution-subscriptions-fix

Ignore Trials when Listing Subscriptions on Institution Hub

GitOrigin-RevId: 9121b08fc16fd3d18fff4a0403354fecec2d4666
This commit is contained in:
Timothée Alby 2019-05-21 15:27:27 +02:00 committed by sharelatex
parent 8c2da6afab
commit 2895a6878c

View file

@ -39,7 +39,7 @@ module.exports = InstitutionsManager =
return callback(error) if error? return callback(error) if error?
userIds = affiliations.map (affiliation) -> ObjectId(affiliation.user_id) userIds = affiliations.map (affiliation) -> ObjectId(affiliation.user_id)
Subscription Subscription
.find admin_id: userIds .find admin_id: userIds, planCode: { $not: /trial/ }
.populate 'admin_id', 'email' .populate 'admin_id', 'email'
.exec callback .exec callback