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

Postup: Správné oblasti

pion.place_id je soutěžní místo, nikoliv oblast.
parent b5b613ea
No related branches found
No related tags found
No related merge requests found
......@@ -1268,10 +1268,12 @@ def org_contest_advance(contest_id: int):
really_inserted = 0
for pp in prev_pions:
# This incurs no real queries as we have all the contests cached
prev_place_id = sess.query(db.Contest).get(pp.contest_id).place_id
if accept_uids and pp.user_id not in accept_uids:
reject_by_place_id[pp.place_id] += 1
reject_by_place_id[prev_place_id] += 1
continue
accept_by_place_id[pp.place_id] += 1
accept_by_place_id[prev_place_id] += 1
if want_execute:
# ORM neumí ON CONFLICT DO NOTHING, takže musíme o vrstvu níže
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment