Merge pull request #141 from sephii/categories-site
Fix categories count attribute to restrict to posts published on current site
This commit is contained in:
commit
87ffaf6d3f
1 changed files with 1 additions and 1 deletions
|
@ -46,7 +46,7 @@ class BlogCategory(TranslatableModel):
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def count(self):
|
def count(self):
|
||||||
return self.blog_posts.filter(publish=True).count()
|
return self.blog_posts.published().count()
|
||||||
|
|
||||||
def get_absolute_url(self):
|
def get_absolute_url(self):
|
||||||
lang = get_language()
|
lang = get_language()
|
||||||
|
|
Loading…
Add table
Reference in a new issue