Commit 8bb0c64f by Calen Pennington

Set grading policy to an empty dict if it can't be decoded from json

parent 3d987851
...@@ -246,7 +246,7 @@ class CourseDescriptor(SequenceDescriptor): ...@@ -246,7 +246,7 @@ class CourseDescriptor(SequenceDescriptor):
policy = json.loads(cls.read_grading_policy(paths, system)) policy = json.loads(cls.read_grading_policy(paths, system))
except ValueError: except ValueError:
system.error_tracker("Unable to decode grading policy as json") 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 # 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 # descriptor 'definition' bucket as a dictionary so that it is persisted in the DB
...@@ -398,7 +398,7 @@ class CourseDescriptor(SequenceDescriptor): ...@@ -398,7 +398,7 @@ class CourseDescriptor(SequenceDescriptor):
return self.metadata.get("cohort_config", {}).get( return self.metadata.get("cohort_config", {}).get(
"auto_cohort_groups", []) "auto_cohort_groups", [])
@property @property
def top_level_discussion_topic_ids(self): def top_level_discussion_topic_ids(self):
""" """
......
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