Skip to content

Commit dc56681

Browse files
hf-kkleinKonstantin
and
Konstantin
authored
fix: allow EbdTables to have 0 rows (#291)
Co-authored-by: Konstantin <konstantin.klein+github@hochfrequenz.de>
1 parent 332ad8d commit dc56681

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/rebdhuhn/models/ebd_table.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -219,15 +219,16 @@ class EbdTable:
219219

220220
metadata: EbdTableMetaData = attrs.field(validator=attrs.validators.instance_of(EbdTableMetaData))
221221
"""
222-
meta data about the table
222+
meta data about the table.
223223
"""
224224
rows: List[EbdTableRow] = attrs.field(
225225
validator=attrs.validators.deep_iterable(
226-
member_validator=attrs.validators.instance_of(EbdTableRow), iterable_validator=attrs.validators.min_len(1)
226+
member_validator=attrs.validators.instance_of(EbdTableRow), iterable_validator=attrs.validators.min_len(0)
227227
),
228228
)
229229
"""
230-
rows are the body of the table
230+
rows are the body of the table;
231+
might have 0 rows, if the EBD exists but is just a paragraph of text, no real table
231232
"""
232233
# pylint: disable=duplicate-code
233234
multi_step_instructions: Optional[List[MultiStepInstruction]] = attrs.field(

0 commit comments

Comments
 (0)