[IMP] cleaning
authorFabien Pinckaers <fp@openerp.com>
Sun, 5 Oct 2014 15:12:06 +0000 (17:12 +0200)
committerFabien Pinckaers <fp@openerp.com>
Sun, 5 Oct 2014 15:12:06 +0000 (17:12 +0200)
addons/website_forum/controllers/main.py

index 00311eb..d86230d 100644 (file)
@@ -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