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)

This commit is contained in:
Chris Dodge
2013-07-23 15:30:32 -04:00
parent b76e7387aa
commit 8584aae866

View File

@@ -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 = []