diff options
| author | Goffin Simon <sig@odoo.com> | 2021-01-28 11:05:28 +0000 |
|---|---|---|
| committer | Goffin Simon <sig@odoo.com> | 2021-02-04 08:49:28 +0000 |
| commit | 196d96ef8eaf8aa06e16c9768ed595fca1c315ff (patch) | |
| tree | a4086ae0f3af5686ad95f41f3e33ca67bc3b428d /addons/website_blog/controllers/main.py | |
| parent | 41ac5b0ea7429f11b554a822287b37d635103a34 (diff) | |
[FIX] website_blog: Traceback on archived blog
Steps to reproduce the bug:
- Create a blogpost in the the blog 'travel
- Archive the blog 'travel'
- Open the blogpost
Bug:
A traceback was raised
opw:2444406
closes odoo/odoo#65204
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Diffstat (limited to 'addons/website_blog/controllers/main.py')
| -rw-r--r-- | addons/website_blog/controllers/main.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/website_blog/controllers/main.py b/addons/website_blog/controllers/main.py index 2249ab7c5a3..a54e3550175 100644 --- a/addons/website_blog/controllers/main.py +++ b/addons/website_blog/controllers/main.py @@ -116,7 +116,7 @@ class WebsiteBlog(http.Controller): step=self._blog_post_per_page, ) - all_tags = blog and blogs.all_tags()[blog.id] or blogs.all_tags(join=True) + all_tags = blogs.all_tags(join=True) if not blog else blogs.all_tags().get(blog.id, request.env['blog.tag']) tag_category = sorted(all_tags.mapped('category_id'), key=lambda category: category.name.upper()) other_tags = sorted(all_tags.filtered(lambda x: not x.category_id), key=lambda tag: tag.name.upper()) |
