From d0cc19fa2a313e138f198b958550a56a37bd8b2e Mon Sep 17 00:00:00 2001 From: Sylvain Fankhauser Date: Mon, 31 Aug 2015 14:28:31 +0200 Subject: [PATCH] Fix categories count attribute to restrict to posts published on current site --- djangocms_blog/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/djangocms_blog/models.py b/djangocms_blog/models.py index 24b7314..6b7b9a2 100644 --- a/djangocms_blog/models.py +++ b/djangocms_blog/models.py @@ -46,7 +46,7 @@ class BlogCategory(TranslatableModel): @property def count(self): - return self.blog_posts.filter(publish=True).count() + return self.blog_posts.published().count() def get_absolute_url(self): lang = get_language()