diff options
| author | Christophe Simonis <chs@odoo.com> | 2019-09-02 17:54:34 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2019-09-02 17:54:34 +0200 |
| commit | ff1f3c557ea989bcb78286d1a19bfc955aee4c00 (patch) | |
| tree | 46d568891593bc31c5041c1668cd7acee2c522b9 /addons/website_blog/controllers/main.py | |
| parent | ca34ae43290372ac2695d6608fff6fe52b2a9835 (diff) | |
| parent | c7c68bab842aba5300f3a9deec28df6e17b40559 (diff) | |
[MERGE] forward port branch 10.0 up to c7c68bab842
Diffstat (limited to 'addons/website_blog/controllers/main.py')
| -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 ce9257387a1..e0b02ddcd9e 100644 --- a/addons/website_blog/controllers/main.py +++ b/addons/website_blog/controllers/main.py @@ -106,6 +106,9 @@ class WebsiteBlog(http.Controller): # retrocompatibility to accept tag as slug active_tag_ids = tag and map(int, [unslug(t)[1] for t in tag.split(',')]) or [] if active_tag_ids: + fixed_tag_slug = ",".join(map(slug, 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)] |
