From 40c1f675611751c36030f6a668f775831ded90d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alberto=20Fern=C3=A1ndez=20Capel?= Date: Wed, 11 Jul 2018 12:10:38 +0100 Subject: [PATCH] Check that the subscription is a group before exporting it to csv I removed this check by mistake, just taking it back. --- .../Features/Subscription/SubscriptionGroupController.coffee | 2 ++ 1 file changed, 2 insertions(+) diff --git a/services/web/app/coffee/Features/Subscription/SubscriptionGroupController.coffee b/services/web/app/coffee/Features/Subscription/SubscriptionGroupController.coffee index cab61c5425..54c5827a20 100644 --- a/services/web/app/coffee/Features/Subscription/SubscriptionGroupController.coffee +++ b/services/web/app/coffee/Features/Subscription/SubscriptionGroupController.coffee @@ -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