From c927a87db3156755ab3b275722404a71dd4312e5 Mon Sep 17 00:00:00 2001 From: rubenwardy Date: Fri, 13 Jan 2023 23:49:06 +0000 Subject: [PATCH] Fix long audit descriptions being lost --- app/models/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/models/__init__.py b/app/models/__init__.py index 8b9cfabf..c5e58dbf 100644 --- a/app/models/__init__.py +++ b/app/models/__init__.py @@ -95,6 +95,8 @@ class AuditLogEntry(db.Model): def __init__(self, causer, severity, title, url, package=None, description=None): if len(title) > 100: + if description is None: + description = title[99:] title = title[:99] + "…" self.causer = causer