From 6fd043fbb7142ead4b56caaf5d4f6ff8c2d7944e Mon Sep 17 00:00:00 2001 From: moanos Date: Sat, 28 Sep 2024 00:41:51 +0200 Subject: [PATCH] fix: allow empy description in description short --- src/fellchensammlung/models.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/fellchensammlung/models.py b/src/fellchensammlung/models.py index 2e62827..12d2a28 100644 --- a/src/fellchensammlung/models.py +++ b/src/fellchensammlung/models.py @@ -188,6 +188,8 @@ class AdoptionNotice(models.Model): @property def description_short(self): + if self.description is None: + return "" if len(self.description) > 200: return self.description[:200] + f" ... [weiterlesen]({self.get_absolute_url()})"