Skip to content

Commit

Permalink
fix: do not instantiate the PartitionService during XBlock validation…
Browse files Browse the repository at this point in the history
… in Studio
  • Loading branch information
Agrendalath committed Aug 1, 2023
1 parent 0bde216 commit f6a60cd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion xmodule/modulestore/split_mongo/split.py
Original file line number Diff line number Diff line change
Expand Up @@ -3287,7 +3287,11 @@ def create_runtime(self, course_entry, lazy):
Create the proper runtime for this course
"""
services = self.services
services["partitions"] = PartitionService(course_entry.course_key)
# Only the CourseBlock can have user partitions. Therefore, creating the PartitionService with the library key
# instead of the course key does not work. The XBlock validation in Studio fails with the following message:
# "This component's access settings refer to deleted or invalid group configurations.".
if not isinstance(course_entry.course_key, LibraryLocator):
services["partitions"] = PartitionService(course_entry.course_key)

return CachingDescriptorSystem(
modulestore=self,
Expand Down

0 comments on commit f6a60cd

Please sign in to comment.