Commit 3200bd41 by dragonfi

Properly serialize OpaqueKey in light_children

parent f3b39ea4
...@@ -301,7 +301,7 @@ class LightChild(Plugin, LightChildrenMixin): ...@@ -301,7 +301,7 @@ class LightChild(Plugin, LightChildrenMixin):
raise ValueError, 'LightChild.name field need to be set to a non-null/empty value' raise ValueError, 'LightChild.name field need to be set to a non-null/empty value'
student_id = self.xmodule_runtime.anonymous_student_id student_id = self.xmodule_runtime.anonymous_student_id
course_id = self.xmodule_runtime.course_id course_id = serialize_opaque_key(self.xmodule_runtime.course_id)
url_name = "%s-%s" % (self.xblock_container.url_name, name) url_name = "%s-%s" % (self.xblock_container.url_name, name)
lightchild_data, created = LightChildModel.objects.get_or_create( lightchild_data, created = LightChildModel.objects.get_or_create(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment