return empty list if no html or pdf textbook appears in policy.json

This commit is contained in:
Brian Wilson
2013-03-11 13:52:43 -04:00
parent cd95872b52
commit 53f85f2a07

View File

@@ -356,14 +356,14 @@ class CourseDescriptor(SequenceDescriptor):
"""
Return the pdf_textbooks config, as a python object, or None if not specified.
"""
return self.metadata.get('pdf_textbooks')
return self.metadata.get('pdf_textbooks', [])
@property
def html_textbooks(self):
"""
Return the html_textbooks config, as a python object, or None if not specified.
"""
return self.metadata.get('html_textbooks')
return self.metadata.get('html_textbooks', [])
@tabs.setter
def tabs(self, value):