fix: append_named_row uses RAW to preserve + in phones; fix seed script to use append_named_row

This commit is contained in:
wasrusgen 2026-05-16 13:09:34 +03:00
parent 632bce8f33
commit a3b0ff511c
2 changed files with 2 additions and 2 deletions

View File

@ -69,7 +69,7 @@ def append_named_row(name: str, data: dict[str, Any]) -> None:
if not headers:
raise ValueError(f"Sheet {name!r} has no header row")
row = [str(data.get(h, "") if data.get(h, "") is not None else "") for h in headers]
ws.append_row(row, value_input_option="USER_ENTERED")
ws.append_row(row, value_input_option="RAW")
def find_row(sheet_name: str, key_col: str, key_val: Any) -> dict[str, Any] | None:

View File

@ -72,7 +72,7 @@ def main():
created = []
for c in cases:
mid = _short_id()
sheets.append_row("Measurements", _row_for_measurement(
sheets.append_named_row("Measurements", _row_for_measurement(
mid, now_iso(),
manager_tg_id=str(MGR_TG_ID),
assigned_to_tg_id=str(MGR_TG_ID), # назначен на себя