diff --git a/addons/website_forum/controllers/main.py b/addons/website_forum/controllers/main.py index d2d44f9944f..968b26fc4fa 100644 --- a/addons/website_forum/controllers/main.py +++ b/addons/website_forum/controllers/main.py @@ -257,7 +257,7 @@ class website_forum(http.Controller): #activity by user. model, comment = Data.get_object_reference(cr, uid, 'mail', 'mt_comment') - activity_ids = Activity.search(cr, uid, [('res_id', 'in', user_post_ids), ('model', '=', 'website.forum.post'), '|', ('subtype_id', '!=', comment), ('subtype_id', '=', False)], context=context) + activity_ids = Activity.search(cr, uid, [('res_id', 'in', user_post_ids), ('model', '=', 'website.forum.post'), ('subtype_id', '!=', comment)], context=context) activities = Activity.browse(cr, uid, activity_ids, context=context) posts = {} @@ -398,7 +398,7 @@ class website_forum(http.Controller): 'content': post.get('content'), } question_tags = [] - if post.get('question_tag').strip('[]'): + if post.get('question_tag') and post.get('question_tag').strip('[]'): Tag = request.registry['website.forum.tag'] tags = post.get('question_tag').strip('[]').replace('"','').split(",") for tag in tags: diff --git a/addons/website_forum/static/src/js/website_forum.js b/addons/website_forum/static/src/js/website_forum.js index 0cf1439102d..907e5d47a01 100644 --- a/addons/website_forum/static/src/js/website_forum.js +++ b/addons/website_forum/static/src/js/website_forum.js @@ -75,7 +75,7 @@ $(document).ready(function () { } else if (data['error'] == 'user'){ var $warning = $('
'+ ''+ - 'Sorry, You cannot choose correct answer.'+ + 'Sorry, the user who asked this question can only accept the answer as correct.'+ '
'); } correct_answer_alert = $link.parent().find("#correct_answer_alert"); diff --git a/addons/website_forum/views/website_forum.xml b/addons/website_forum/views/website_forum.xml index 3d8bad7b64e..be95d3f89a8 100644 --- a/addons/website_forum/views/website_forum.xml +++ b/addons/website_forum/views/website_forum.xml @@ -815,17 +815,19 @@