Skip to content

Commit

Permalink
Remove section_name From Flatahb If segment_code Is Empty, modified t…
Browse files Browse the repository at this point in the history
…est (#341)
  • Loading branch information
DeltaDaniel committed Jul 9, 2024
1 parent b7d010d commit d42f8d8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/kohlrahbi/unfoldedahb/unfoldedahbtable.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ def convert_to_flat_ahb(self) -> FlatAnwendungshandbuch:
value_pool_entry=unfolded_ahb_line.code,
name=unfolded_ahb_line.beschreibung or unfolded_ahb_line.qualifier,
ahb_expression=unfolded_ahb_line.bedingung_ausdruck,
section_name=unfolded_ahb_line.segment_name,
section_name=unfolded_ahb_line.segment_name if unfolded_ahb_line.segment is not None else None,
index=unfolded_ahb_line.index,
)
)
Expand Down
4 changes: 2 additions & 2 deletions unittests/test_unfolded_ahb_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def test_convert_to_flat_ahb(self) -> None:
lines=[
AhbLine(
guid=None,
section_name="Ansprechpartner",
section_name=None,
segment_group_key="SG3",
segment_code=None,
data_element=None,
Expand All @@ -122,7 +122,7 @@ def test_convert_to_flat_ahb(self) -> None:
),
AhbLine(
guid=None,
section_name="Ansprechpartner",
section_name=None,
segment_group_key="SG3",
segment_code=None,
data_element=None,
Expand Down

0 comments on commit d42f8d8

Please sign in to comment.