мини защита от сброса данных в базе данных, если данных нет

This commit is contained in:
2026-05-25 12:34:29 +03:00
parent 18bac0d12d
commit 801936518a
3 changed files with 12 additions and 10 deletions

View File

@@ -68,13 +68,13 @@ def parse_standings(html: str) -> list[dict]:
def run_parser_standings() -> None:
html = fetch_html(URL_STANDINGS)
standings_rows = parse_standings(html)
if standings_rows:
sync_standings(
season=SEASON,
standings_rows=standings_rows,
)
sync_standings(
season=SEASON,
standings_rows=standings_rows,
)
print(f"[parser_standings] Synced rows: {len(standings_rows)}")
print(f"[parser_standings] Synced rows: {len(standings_rows)}")
if __name__ == "__main__":