From: Michael Tremer Date: Sat, 1 Sep 2018 15:09:14 +0000 (+0100) Subject: blog: Don't change slug when title hasn't been changed X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=baa294fb32c0b43818bdff8c6450b9a2ce9b6ee9;p=ipfire.org.git blog: Don't change slug when title hasn't been changed Signed-off-by: Michael Tremer --- diff --git a/src/backend/blog.py b/src/backend/blog.py index 169a40d8..a11d4eba 100644 --- a/src/backend/blog.py +++ b/src/backend/blog.py @@ -284,7 +284,8 @@ class Post(misc.Object): Called to update the content of this post """ # Update slug when post isn't published yet - slug = self.slug if self.is_published() else self.backend.blog._make_slug(title) + slug = self.backend.blog._make_slug(title) \ + if not self.is_published() and not self.title == title else self.slug # XXX render HTML