summaryrefslogtreecommitdiff
path: root/addons/website_forum/controllers
diff options
context:
space:
mode:
authorJeremy Kersten <jke@odoo.com>2020-05-15 11:54:03 +0000
committerJeremy Kersten <jke@odoo.com>2020-06-08 07:43:06 +0000
commit84ff744eb0daffe4073dde47b885f2900aa524a1 (patch)
treea534e3168fae5f8baa86a839dda4c562ece98105 /addons/website_forum/controllers
parentd8e2cd2082426b849f7e31f8ca7123fd39aca737 (diff)
[IMP] website_forum: perf - use the stored field instead to recompute it
Diffstat (limited to 'addons/website_forum/controllers')
-rw-r--r--addons/website_forum/controllers/main.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/website_forum/controllers/main.py b/addons/website_forum/controllers/main.py
index 51a4c00b0c1..3b5fbeae0b4 100644
--- a/addons/website_forum/controllers/main.py
+++ b/addons/website_forum/controllers/main.py
@@ -245,7 +245,7 @@ class WebsiteForum(WebsiteProfile):
values.update({
'main_object': question,
'question': question,
- 'can_bump': (question.forum_id.allow_bump and not question.child_ids and (datetime.today() - question.write_date).days > 9),
+ 'can_bump': (question.forum_id.allow_bump and not question.child_count and (datetime.today() - question.write_date).days > 9),
'header': {'question_data': True},
'filters': filters,
'reversed': reversed,