sync
CI / backend-and-migrations (push) Canceled after 0s
CI / astro-build (push) Canceled after 0s
CI / compose-e2e (push) Canceled after 0s

This commit is contained in:
ik
2026-09-08 09:31:41 +07:00
parent 8b2d7e2e1c
commit ddb6909c4d
21 changed files with 255 additions and 58 deletions
+4 -4
View File
@@ -34,13 +34,13 @@ def activity_rows(
CatchReport.reported_at >= now - timedelta(hours=hours),
)
)
reports = list(session.scalars(query))
if waterbody:
reports = [r for r in reports if r.waterbody.slug == waterbody]
query = query.where(CatchReport.waterbody.has(slug=waterbody))
if fish:
reports = [r for r in reports if r.fish.slug == fish]
query = query.where(CatchReport.fish.has(slug=fish))
if method:
reports = [r for r in reports if r.fishing_method == method]
query = query.where(CatchReport.fishing_method == method)
reports = list(session.scalars(query))
groups: dict[tuple[object, object], list[CatchReport]] = {}
for report in reports: