Commit 0c59aa78 by Arjun Singh Committed by Matthew Mongeau

allowing for 0 top level topics

parent 6105f892
...@@ -123,7 +123,7 @@ def initialize_discussion_info(course): ...@@ -123,7 +123,7 @@ def initialize_discussion_info(course):
node[level]["entries"][entry["title"]] = {"id": entry["id"], node[level]["entries"][entry["title"]] = {"id": entry["id"],
"sort_key": entry["sort_key"]} "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"], category_map['entries'][topic] = {"id": entry["id"],
"sort_key": entry.get("sort_key", topic)} "sort_key": entry.get("sort_key", topic)}
......
...@@ -45,7 +45,6 @@ class @NewPostView extends Backbone.View ...@@ -45,7 +45,6 @@ class @NewPostView extends Backbone.View
# change and 2) can't set in initialize because the button is hidden # change and 2) can't set in initialize because the button is hidden
@maxNameWidth = @dropdownButton.width() * 0.9 @maxNameWidth = @dropdownButton.width() * 0.9
# Need a fat arrow because hideTopicDropdown is passed as a callback to bind # Need a fat arrow because hideTopicDropdown is passed as a callback to bind
hideTopicDropdown: () => hideTopicDropdown: () =>
@menuOpen = false @menuOpen = false
......
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