Skip to content

Commit 108b3aa

Browse files
authored
Merge pull request #95 from filips123/xlsx-parsing
Update parsing criteria
2 parents ab436cd + 3c563af commit 108b3aa

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

API/gimvicurnik/updaters/eclassroom.py

+4-6
Original file line numberDiff line numberDiff line change
@@ -662,14 +662,12 @@ def _parse_lunch_schedule_xlsx(self, stream: BytesIO, effective: date) -> None:
662662

663663
# Parse lunch schedule
664664
for ws in wb:
665-
if ws.title != "kosilo":
666-
continue
667-
668-
while not ws["A1"].value:
669-
ws.delete_cols(1)
665+
for column in ws.column_dimensions.values():
666+
if column.hidden:
667+
ws.delete_cols(1)
670668

671669
for wr in ws.iter_rows(min_row=3, max_col=5):
672-
if not wr[3].value:
670+
if not wr[3].value and wr[3].value != 0:
673671
break
674672

675673
# Check for correct cell value type

0 commit comments

Comments
 (0)