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

create-contests: Přeskakuje již existující soutěže

parent 0d22b59c
No related branches found
No related tags found
No related merge requests found
...@@ -48,7 +48,10 @@ else: ...@@ -48,7 +48,10 @@ else:
assert regions, "Neexistují žádná místa dané úrovně" assert regions, "Neexistují žádná místa dané úrovně"
for r in regions: for r in regions:
print(f"Zakládám {round.round_code()} pro místo {r.name}") if sess.query(db.Contest).filter_by(round=round, place=r).first():
print(f"{round.round_code()} pro místo {r.name}: již existuje")
else:
print(f"{round.round_code()} pro místo {r.name}: zakládám")
if not args.dry_run: if not args.dry_run:
c = db.Contest(round=round, place=r, state=state) c = db.Contest(round=round, place=r, state=state)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment