diff --git a/community/www/batch/utils.py b/community/www/batch/utils.py index 8f375248..24b5dd32 100644 --- a/community/www/batch/utils.py +++ b/community/www/batch/utils.py @@ -13,7 +13,7 @@ def get_common_context(context): return batch = course.get_batch(batch_name) - if not batch: + if not batch or not batch.is_member(frappe.session.user): frappe.local.flags.redirect_location = "/courses/" + course_name raise frappe.Redirect