fix: allow empy description in description short

This commit is contained in:
moanos [he/him] 2024-09-28 00:41:51 +02:00
parent c037563fd2
commit 6fd043fbb7

View File

@ -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()})"