From a42f3eab8e97a77cb1299286016247dafaba8c41 Mon Sep 17 00:00:00 2001 From: konstantin Date: Mon, 20 May 2024 08:40:17 +0000 Subject: [PATCH] Fix regression: Treat empty string `''` as `None` data element ID (#312) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fixes: > ERROR [kohlrahbi] Could not convert the unfolded AHB to a flat AHB for Prüfidentifikator '15003' ERROR [kohlrahbi] Error processing pruefi '15003': The data_element '' does not match re.compile('^\\d{4}$') introduced in v1.1.0 --- src/kohlrahbi/unfoldedahb/unfoldedahbtable.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/kohlrahbi/unfoldedahb/unfoldedahbtable.py b/src/kohlrahbi/unfoldedahb/unfoldedahbtable.py index 6c2be21d..ab1a1c48 100644 --- a/src/kohlrahbi/unfoldedahb/unfoldedahbtable.py +++ b/src/kohlrahbi/unfoldedahb/unfoldedahbtable.py @@ -46,7 +46,7 @@ def _split_data_element_and_segment_id(value: str | None) -> tuple[str | None, s """ returns the data element id and segment id """ - if value is None: + if not value: # covers both None and empty string return None, None datenelement_id: str | None segment_id: str | None