From 8bb0c64ff95447963f8cbae9fe0e031aa3239cff Mon Sep 17 00:00:00 2001 From: Calen Pennington Date: Fri, 8 Mar 2013 15:36:19 -0500 Subject: [PATCH] Set grading policy to an empty dict if it can't be decoded from json --- common/lib/xmodule/xmodule/course_module.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/lib/xmodule/xmodule/course_module.py b/common/lib/xmodule/xmodule/course_module.py index 72196f92a2..764a35b77a 100644 --- a/common/lib/xmodule/xmodule/course_module.py +++ b/common/lib/xmodule/xmodule/course_module.py @@ -246,7 +246,7 @@ class CourseDescriptor(SequenceDescriptor): policy = json.loads(cls.read_grading_policy(paths, system)) except ValueError: system.error_tracker("Unable to decode grading policy as json") - policy = None + policy = {} # cdodge: import the grading policy information that is on disk and put into the # descriptor 'definition' bucket as a dictionary so that it is persisted in the DB @@ -398,7 +398,7 @@ class CourseDescriptor(SequenceDescriptor): return self.metadata.get("cohort_config", {}).get( "auto_cohort_groups", []) - + @property def top_level_discussion_topic_ids(self): """