From 1abb191b5eb77af7bc5ea58b88435c4796d47ab7 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Wed, 3 Nov 2021 09:33:39 +0100 Subject: [PATCH] Don't add note suffix for empty note --- buildsrht/blueprints/jobs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildsrht/blueprints/jobs.py b/buildsrht/blueprints/jobs.py index 2b834f6..263af0d 100644 --- a/buildsrht/blueprints/jobs.py +++ b/buildsrht/blueprints/jobs.py @@ -188,7 +188,7 @@ def addsuffix(note: str, suffix: str) -> str: """ maxlen = Job.note.prop.columns[0].type.length assert len(suffix) + 1 <= maxlen, f"Suffix was too long ({len(suffix)})" - if note.endswith(suffix): + if note.endswith(suffix) or not note: return note result = f"{note} {suffix}" if len(result) <= maxlen: -- 2.38.5