Check that the subscription is a group before exporting it to csv

I removed this check by mistake, just taking it back.
This commit is contained in:
Alberto Fernández Capel 2018-07-11 12:10:38 +01:00
parent 3586fe8406
commit 40c1f67561

View file

@ -69,6 +69,8 @@ module.exports =
logger.log user_id: user_id, "exporting group csv"
SubscriptionLocator.getManagedSubscription user_id, (err, subscription)->
return next(error) if error?
if !subscription.groupPlan
return res.redirect("/")
SubscriptionGroupHandler.getPopulatedListOfMembers subscription._id, (err, users)->
groupCsv = ""
for user in users