Skip to content

Commit

Permalink
Fix regression: Treat empty string '' as None data element ID (#312)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
hf-kklein committed May 20, 2024
1 parent be97b58 commit a42f3ea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/kohlrahbi/unfoldedahb/unfoldedahbtable.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a42f3ea

Please sign in to comment.