Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove section_name From Flatahb If segment_code Is Empty, modified test #341

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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