Skip to content

Commit

Permalink
[FIX] website_forum: remove leftover of old url with /question/
Browse files Browse the repository at this point in the history
Avoid redirect to forum/<name>/question/<post> that will rediret in all
case to /forum/<name>/<post>.

closes #159554

X-original-commit: 5286ef4
Signed-off-by: Jérémy Kersten <jke@odoo.com>
  • Loading branch information
JKE-be committed Mar 30, 2024
1 parent 255d10f commit e571d58
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion addons/website_forum/controllers/website_forum.py
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ def question_edit_answer(self, forum, question, **kwargs):
@http.route('/forum/<model("forum.forum"):forum>/question/<model("forum.post"):question>/close', type='http', auth="user", methods=['POST'], website=True)
def question_close(self, forum, question, **post):
question.close(reason_id=int(post.get('reason_id', False)))
return request.redirect("/forum/%s/question/%s" % (slug(forum), slug(question)))
return request.redirect("/forum/%s/%s" % (slug(forum), slug(question)))

@http.route('/forum/<model("forum.forum"):forum>/question/<model("forum.post"):question>/reopen', type='http', auth="user", methods=['POST'], website=True)
def question_reopen(self, forum, question, **kwarg):
Expand Down

0 comments on commit e571d58

Please sign in to comment.