diff options
| author | Christophe Simonis <chs@odoo.com> | 2019-09-02 19:57:25 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2019-09-02 19:57:25 +0200 |
| commit | 149d782a0eb02fe036620fcd05d074886f1da4fe (patch) | |
| tree | bba9137d3480042c5fd671db416d24b74de11fb4 /addons/website_blog/controllers | |
| parent | ed90ad0a01b25c25953b5d111e636317c00ca83c (diff) | |
| parent | 79ff916b5963b21bd96fac1a6e00ee206fa75fa8 (diff) | |
[MERGE] forward port branch saas-11.3 up to 79ff916b596
Diffstat (limited to 'addons/website_blog/controllers')
| -rw-r--r-- | addons/website_blog/controllers/main.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/addons/website_blog/controllers/main.py b/addons/website_blog/controllers/main.py index 51a2deb3158..6f02268afc0 100644 --- a/addons/website_blog/controllers/main.py +++ b/addons/website_blog/controllers/main.py @@ -109,6 +109,9 @@ class WebsiteBlog(http.Controller): # retrocompatibility to accept tag as slug active_tag_ids = tag and [int(unslug(t)[1]) for t in tag.split(',')] or [] if active_tag_ids: + fixed_tag_slug = ",".join(slug(t) for t in request.env['blog.tag'].browse(active_tag_ids)) + if fixed_tag_slug != tag: + return request.redirect(request.httprequest.full_path.replace("/tag/%s/" % tag, "/tag/%s/" % fixed_tag_slug, 1), 301) domain += [('tag_ids', 'in', active_tag_ids)] if blog: domain += [('blog_id', '=', blog.id)] |
