From be0ecb665e920286e557ea1f1c7394fd65bc862b Mon Sep 17 00:00:00 2001 From: bkfox Date: Fri, 11 Oct 2019 16:35:27 +0200 Subject: [PATCH] update --- aircox/models/page.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aircox/models/page.py b/aircox/models/page.py index 2b7c4b9..3d2dcd2 100644 --- a/aircox/models/page.py +++ b/aircox/models/page.py @@ -100,7 +100,7 @@ class Page(models.Model): def save(self, *args, **kwargs): if not self.slug: self.slug = slugify(self.title) - count = Page.objects.all(slug__startswith=self.slug).count() + count = Page.objects.filter(slug__startswith=self.slug).count() if count: self.slug += '-' + count if self.is_published and self.pub_date is None: