diff --git a/tildes/tildes/templates/bookmarks.jinja2 b/tildes/tildes/templates/bookmarks.jinja2 index 8b77003..59fc2ec 100644 --- a/tildes/tildes/templates/bookmarks.jinja2 +++ b/tildes/tildes/templates/bookmarks.jinja2 @@ -12,10 +12,10 @@
-
  • +
  • Topics
  • -
  • +
  • Comments
  • @@ -35,7 +35,7 @@ {% endfor %} - {% if post_type and (posts.has_prev_page or posts.has_next_page) %} + {% if posts.has_prev_page or posts.has_next_page %} {% endif %} diff --git a/tildes/tildes/views/bookmarks.py b/tildes/tildes/views/bookmarks.py index 9d5e958..22eeb0b 100644 --- a/tildes/tildes/views/bookmarks.py +++ b/tildes/tildes/views/bookmarks.py @@ -17,7 +17,11 @@ from tildes.schemas.listing import PaginatedListingSchema @view_config(route_name="bookmarks", renderer="bookmarks.jinja2") @use_kwargs(PaginatedListingSchema) @use_kwargs( - {"post_type": String(load_from="type", validate=OneOf(("topic", "comment")))} + { + "post_type": String( + load_from="type", validate=OneOf(("topic", "comment")), missing="topic" + ) + } ) def get_bookmarks( request: Request, @@ -35,7 +39,7 @@ def get_bookmarks( if post_type == "comment": post_cls = Comment bookmark_cls = CommentBookmark - else: + elif post_type == "topic": post_cls = Topic bookmark_cls = TopicBookmark