diff --git a/lms/djangoapps/django_comment_client/utils.py b/lms/djangoapps/django_comment_client/utils.py index c3e2708f67..ed97c43113 100644 --- a/lms/djangoapps/django_comment_client/utils.py +++ b/lms/djangoapps/django_comment_client/utils.py @@ -129,6 +129,8 @@ def filter_unstarted_categories(category_map): def sort_map_entries(category_map): things = [] for title, entry in category_map["entries"].items(): + if entry["sort_key"] == None: + entry["sort_key"] = title things.append((title, entry)) for title, category in category_map["subcategories"].items(): things.append((title, category)) diff --git a/lms/templates/discussion/_filter_dropdown.html b/lms/templates/discussion/_filter_dropdown.html index a51467eade..c09f295b11 100644 --- a/lms/templates/discussion/_filter_dropdown.html +++ b/lms/templates/discussion/_filter_dropdown.html @@ -2,7 +2,6 @@ <%! import json %> <%def name="render_dropdown(map)"> - ${map["children"].sort()} % for child in map["children"]: % if child in map["entries"]: ${render_entry(map["entries"], child)}