From 3698326c52510f2d255057615041fbaa87fefe55 Mon Sep 17 00:00:00 2001 From: Markos Gogoulos Date: Fri, 12 Jun 2026 09:14:46 +0300 Subject: [PATCH] fix: specify remove from groups option --- lti/handlers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lti/handlers.py b/lti/handlers.py index a6d5531d..c2201f6c 100644 --- a/lti/handlers.py +++ b/lti/handlers.py @@ -287,7 +287,7 @@ def provision_lti_bulk_contexts(platform, user, publish_data_raw): # Remove memberships for groups that belong to this platform but were absent # from the current publishdata — meaning the user is no longer enrolled. - if seen_group_ids: + if seen_group_ids and platform.remove_from_groups_on_unenroll: platform_group_ids = set(LTIResourceLink.objects.filter(platform=platform, rbac_group__isnull=False).values_list('rbac_group_id', flat=True)) stale_ids = platform_group_ids - seen_group_ids if stale_ids: