diff --git a/addons/website_forum/controllers/main.py b/addons/website_forum/controllers/main.py index 00311eb93f3..d86230d0057 100644 --- a/addons/website_forum/controllers/main.py +++ b/addons/website_forum/controllers/main.py @@ -96,13 +96,8 @@ class WebsiteForum(http.Controller): else: filters = 'all' - if post_type == 'link': - domain += [('type', '=', 'link')] - elif post_type == 'question': - domain += [('type', '=', 'question')] - elif post_type == 'discussion': - domain += [('type', '=', 'discussion')] - + if post_type: + domain += [('type', '=', post_type)] if not sorting: sorting = forum.default_order