diff --git a/src/data/bzzoiro.py b/src/data/bzzoiro.py index de88e06..1bd2d36 100644 --- a/src/data/bzzoiro.py +++ b/src/data/bzzoiro.py @@ -16,6 +16,7 @@ from collections.abc import Iterable from datetime import datetime, timedelta, timezone from sqlalchemy import select +from sqlalchemy.orm import selectinload import httpx @@ -585,7 +586,7 @@ async def ingest_bzzoiro_event_stats( stmt = ( select(Match) - .options(select(Match.stats)) + .options(selectinload(Match.stats)) .where(Match.match_status == "finished") .where(Match.source_event_id.is_not(None)) .where(Match.league_id.in_(league_ids))