diff --git a/cms/djangoapps/contentstore/outlines.py b/cms/djangoapps/contentstore/outlines.py index 2766887b0f..9f6656084d 100644 --- a/cms/djangoapps/contentstore/outlines.py +++ b/cms/djangoapps/contentstore/outlines.py @@ -101,6 +101,7 @@ def _bubbled_up_groups_from_units(group_access_from_units): return { user_partition_id: sorted(group_ids) # sorted for easier comparison for user_partition_id, group_ids in group_access.items() + if group_ids # Ignore empty groups } normalized_group_access_dicts = [ diff --git a/cms/djangoapps/contentstore/tests/test_outlines.py b/cms/djangoapps/contentstore/tests/test_outlines.py index c4bd28e70b..0e75fe8076 100644 --- a/cms/djangoapps/contentstore/tests/test_outlines.py +++ b/cms/djangoapps/contentstore/tests/test_outlines.py @@ -348,7 +348,10 @@ class OutlineFromModuleStoreTestCase(ModuleStoreTestCase): parent_location=seq_1.location, category='vertical', display_name='Single Vertical', - group_access={50: [1, 2]}, + group_access={ + 50: [1, 2], + 51: [], # Empty group shouldn't bubble up. + }, ) outline, errs = get_outline_from_modulestore(self.course_key)