From f83605c35f5af8aff4bace82c8cd6a44529c1edf Mon Sep 17 00:00:00 2001 From: rubenwardy Date: Mon, 19 Jul 2021 23:11:02 +0100 Subject: [PATCH] Fix too long Draft/ChangesNeeded messages --- app/blueprints/admin/admin.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/blueprints/admin/admin.py b/app/blueprints/admin/admin.py index 47f5fe7a..083c098a 100644 --- a/app/blueprints/admin/admin.py +++ b/app/blueprints/admin/admin.py @@ -203,9 +203,11 @@ def admin_page(): packages_list = "and ".join(packages) havent = "haven't" if len(packages) > 1 else "hasn't" + if len(packages_list) + 54 > 100: + packages_list = packages_list[0:(100-54-1)] + "…" addNotification(user, system_user, NotificationType.PACKAGE_APPROVAL, - f"Did you forget? {packages_list} {havent} been submitted for review yet", + f"Did you forget? {packages_list} {havent} been submitted for review yet", url_for('todo.view_user', username=user.username)) db.session.commit()