mirror of
https://github.com/wasrusgen/zov-tech.git
synced 2026-06-03 18:04:47 +00:00
_ensure_measurements_sheet() now:
1. Creates sheet with canonical headers if missing
2. Adds any missing columns
3. If column ORDER doesn't match _measurement_columns() — migrates all
data rows in-place: reads by column name, rewrites in canonical order
@app.on_event("startup") calls _ensure_measurements_sheet() via
asyncio.to_thread so column order is always corrected on deploy,
not just on first client_create.
This guarantees append_named_row() always finds columns in expected
positions, eliminating the silent data-in-wrong-column bug.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
||
|---|---|---|
| .. | ||
| parsers | ||
| __init__.py | ||
| ai.py | ||
| auth.py | ||
| catalog.py | ||
| config.py | ||
| drive.py | ||
| gcalendar.py | ||
| geocoder.py | ||
| main.py | ||
| proposals.py | ||
| proxy_pool.py | ||
| sheets.py | ||
| telegram.py | ||