From e97f4a37022a5745dd0cbb58f93bf09f10b22889 Mon Sep 17 00:00:00 2001 From: luxagraf Date: Sat, 29 Aug 2020 21:38:21 -0400 Subject: added same fix to jrnl --- app/jrnl/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/jrnl/models.py b/app/jrnl/models.py index 69d1178..9ceac2d 100644 --- a/app/jrnl/models.py +++ b/app/jrnl/models.py @@ -199,7 +199,7 @@ class Entry(models.Model): self.featured_image.sizes.add(s) self.featured_image.sizes.add(ss) self.featured_image.save() - if old.title != self.title or old.slug != self.slug: + if old and old.title != self.title or old and old.slug != self.slug: related, c = RelatedPost.objects.get_or_create(model_name=self.get_content_type(), entry_id = self.id, pub_date=self.pub_date) related.title = self.title related.slug = self.slug -- cgit v1.2.3-70-g09d2