Skip to content
Snippets Groups Projects
Commit 4d3f3092 authored by Martin Mareš's avatar Martin Mareš
Browse files

fixup! fixup! fixup! Diplomy/UI: Přehled ocenění studentů pro školní garanty

parent 1ac6be8e
No related branches found
No related tags found
No related merge requests found
......@@ -358,10 +358,11 @@ def org_school_results(school_id: int):
contest_counts = (sess.query(db.Contest.contest_id, func.count(db.Participation.user_id))
.select_from(db.Contest)
.join(db.Contest.round)
.join(db.Contest.participations)
.filter(db.Contest.contest_id == db.Contest.master_contest_id,
db.Round.year == config.CURRENT_YEAR,
db.Participation.user_id.in_(select(pants_subq)),
db.Participation.year == config.CURRENT_YEAR,
db.Participation.state == db.PartState.active)
.group_by(db.Contest.contest_id)
.all())
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment