В заземление добавлены новые линии и обновлён скрипт

This commit is contained in:
Nail Sagitov 2026-08-20 15:33:39 +05:00
parent 697ce32c48
commit e6b1caa6ff
2 changed files with 10 additions and 0 deletions

View File

@ -202,10 +202,20 @@ def load_groups(
start_row, end_row = row_range
start_row = max(start_row, 4)
last_row = min(end_row, worksheet.max_row) if end_row is not None else worksheet.max_row
last_doc_num = ""
last_stage = ""
for row_index in range(start_row, last_row + 1):
note = normalize_text(worksheet.cell(row_index, 13).value)
doc_num = normalize_text(worksheet.cell(row_index, 14).value)
stage = normalize_text(worksheet.cell(row_index, 15).value)
if doc_num:
last_doc_num = doc_num
else:
doc_num = last_doc_num
if stage:
last_stage = stage
else:
stage = last_stage
note_empty = not note
discipline = note
if not discipline: