jones-dev #19

Merged
corbz merged 106 commits from jones-dev into master 2024-01-26 17:39:03 +00:00
Showing only changes of commit 3f7127347b - Show all commits

View File

@ -106,8 +106,11 @@ class Ticket(models.Model):
def short_description(self):
"""Provide a snippet of the description for presentation purposes."""
short_description = bleach.clean(self.description, tags=[])[:150]
return f"{short_description}..."
short_description = bleach.clean(self.description, tags=[])
if len(short_description) > 200:
return f"{short_description[:200]}..."
return short_description
def save(self, *args, **kwargs):
"""Override the save method to clean the description and apply timestamps."""