From d18f42224c9906915725e585f8ab20291eb88cac Mon Sep 17 00:00:00 2001 From: Chris Dodge Date: Mon, 17 Dec 2012 10:41:54 -0500 Subject: [PATCH] fix crash of custom tags when running against Mongo datastores. Mongo's 'system' does not have a course_id attribute defined, which makes it asymmetric to XmlFilesystem store --- common/lib/xmodule/xmodule/modulestore/mongo.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/common/lib/xmodule/xmodule/modulestore/mongo.py b/common/lib/xmodule/xmodule/modulestore/mongo.py index 19f506906c..c65c031c9a 100644 --- a/common/lib/xmodule/xmodule/modulestore/mongo.py +++ b/common/lib/xmodule/xmodule/modulestore/mongo.py @@ -51,6 +51,9 @@ class CachingDescriptorSystem(MakoDescriptorSystem): self.modulestore = modulestore self.module_data = module_data self.default_class = default_class + # cdodge: other Systems have a course_id attribute defined. To keep things consistent, let's + # define an attribute here as well, even though it's None + self.course_id = None def load_item(self, location): location = Location(location)