Skip to content
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
8 changes: 6 additions & 2 deletions src/ebdamame/docxtableconverter.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,10 @@ def __init__(self, docx_tables: List[Table], ebd_key: str, chapter: str, sub_cha
# remove duplicates. Although there are usually only 5 columns visible, technically there might be even 8.
# In these cases (e.g. for E_0453) columns like 'Prüfergebnis' simply occur twice in the docx table header.
distinct_cell_texts: List[str] = [
x[0] for x in groupby(first(docx_tables).row_cells(row_index), lambda cell: cell.text)
x[0]
for x in groupby(
first(docx_tables).rows[row_index].cells, lambda cell: cell.text
) # row_cells() is deprecated and returns false rows
]
for column_index, table_cell_text in enumerate(distinct_cell_texts):
if row_index == 0 and _is_pruefende_rolle_cell_text(table_cell_text):
Expand All @@ -188,7 +191,8 @@ def __init__(self, docx_tables: List[Table], ebd_key: str, chapter: str, sub_cha
self._column_index_result_code = column_index
elif table_cell_text == "Hinweis":
self._column_index_note = column_index

# if not self._column_index_step_number:
# self._column_index_step_number = 0
self._metadata = EbdTableMetaData(ebd_code=ebd_key, sub_chapter=sub_chapter, chapter=chapter, role=role)

@staticmethod
Expand Down
Loading