sync
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user