allowing for 0 top level topics

This commit is contained in:
Arjun Singh
2012-09-03 23:04:30 -07:00
parent 098b90ebac
commit 629a8e7ed5
2 changed files with 1 additions and 2 deletions

View File

@@ -120,7 +120,7 @@ def initialize_discussion_info(course):
node[level]["entries"][entry["title"]] = {"id": entry["id"],
"sort_key": entry["sort_key"]}
for topic, entry in course.metadata['discussion_topics'].items():
for topic, entry in course.metadata.get('discussion_topics', {}).items():
category_map['entries'][topic] = {"id": entry["id"],
"sort_key": entry.get("sort_key", topic)}

View File

@@ -42,7 +42,6 @@ class @NewPostView extends Backbone.View
# change and 2) can't set in initialize because the button is hidden
@maxNameWidth = @dropdownButton.width() * 0.9
# Need a fat arrow because hideTopicDropdown is passed as a callback to bind
hideTopicDropdown: () =>
@menuOpen = false