Commit 8584aae8 by Chris Dodge

It seems like self.tabs is getting set to an empty set [] now rather than None.…

It seems like self.tabs is getting set to an empty set [] now rather than None. This causes the tab defaulting to not populate, leading to crashes in the LMS if someone makes a new course with additional tabs (e.g. static tabs or pdf-textbooks)
parent b76e7387
......@@ -410,7 +410,7 @@ class CourseDescriptor(CourseFields, SequenceDescriptor):
continue
# TODO check that this is still needed here and can't be by defaults.
if self.tabs is None:
if not self.tabs or (isinstance(self.tabs, list) and len(self.tabs) == 0):
# When calling the various _tab methods, can omit the 'type':'blah' from the
# first arg, since that's only used for dispatch
tabs = []
......
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