fix: allow empy description in description short
This commit is contained in:
parent
c037563fd2
commit
6fd043fbb7
@ -188,6 +188,8 @@ class AdoptionNotice(models.Model):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def description_short(self):
|
def description_short(self):
|
||||||
|
if self.description is None:
|
||||||
|
return ""
|
||||||
if len(self.description) > 200:
|
if len(self.description) > 200:
|
||||||
return self.description[:200] + f" ... [weiterlesen]({self.get_absolute_url()})"
|
return self.description[:200] + f" ... [weiterlesen]({self.get_absolute_url()})"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user