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

p-score: Už umíme dělená kola

parent 0d58f1dc
Branches
No related tags found
No related merge requests found
......@@ -141,10 +141,11 @@ def write_html(round, tasks, contests, results):
out.write(f'<tr><td colspan={num_cols}>\n\n')
round = sess.query(db.Round).filter_by(year=args.year, category='P', seq=args.seq).one()
round = sess.query(db.Round).filter_by(year=args.year, category='P', seq=args.seq).filter(db.Round.master_round_id == db.Round.round_id).one()
print(f"Kolo {round.round_code()}")
tasks = sess.query(db.Task).filter_by(round=round).order_by(db.Task.code).all()
round_group_subq = sess.query(db.Round.round_id).filter_by(master_round_id=round.round_id).subquery()
tasks = sess.query(db.Task).filter(db.Task.round_id.in_(round_group_subq)).order_by(db.Task.code).all()
contests = (sess.query(db.Contest)
.filter_by(round=round)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment