From 3704274e26afee0934f3c300d2104b0551cc6d73 Mon Sep 17 00:00:00 2001 From: Simon Steuer Date: Mon, 14 Oct 2024 15:59:55 +0200 Subject: [PATCH] =?UTF-8?q?Regul=C3=A4ren=20Ausdruck=20so=20angepasst,=20d?= =?UTF-8?q?ass=20auch=20'-=20BG',=20bzw.=20Variationen=20davon=20aus=20der?= =?UTF-8?q?=20Bezeichnung=20entfernt=20wird.=20Ohne=20Entfernung=20wird=20?= =?UTF-8?q?beim=20Migrieren=20an=20das=20bereits=20bestehende=20'-=20BG'?= =?UTF-8?q?=20nochmal=20ein=20'-=20BG'=20angeh=C3=A4ngt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/caditem.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/caditem.py b/lib/caditem.py index 9ddf1f8..67b6687 100644 --- a/lib/caditem.py +++ b/lib/caditem.py @@ -408,7 +408,7 @@ class CadItem(DataModel): # Spezial: Abkürzungen .kpl rausschmeissen. Text eventuell kürzen if "bezeichnung1_sivas" in translated_data: text = translated_data["bezeichnung1_sivas"] - substituted_text = re.sub(r"\s+kpl[.|\s]", "", text, flags=re.I) + substituted_text = re.sub(r"\s+(?:-\s*bg|kpl)[.|\s]*", "", text, flags=re.I) if substituted_text != text: translated_data["bezeichnung1_neu"] = substituted_text