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

Uzavírání soutěže kontroluje diplomy pro neaktivní účastníky

parent 75d637b4
No related branches found
No related tags found
1 merge request!137Sazba diplomů
...@@ -128,4 +128,16 @@ def check_contest_state(round: db.Round, state: db.RoundState, contest: Optional ...@@ -128,4 +128,16 @@ def check_contest_state(round: db.Round, state: db.RoundState, contest: Optional
.all()) .all())
add_ct_errors(ct_no_score, 'Chybí oficiální výsledková listina') add_ct_errors(ct_no_score, 'Chybí oficiální výsledková listina')
ct_bad_cert = (contests_query
.filter((sess.query(db.Certificate)
.filter(db.Certificate.cert_set_id == db.Contest.contest_id)
.join(db.Participation, and_(db.Participation.user_id == db.Certificate.user_id,
db.Participation.contest_id == db.Contest.contest_id,
db.Participation.state != db.PartState.active))
.join(db.User, and_(db.User.user_id == db.Participation.user_id,
not_(db.User.is_test))))
.exists())
.all())
add_ct_errors(ct_bad_cert, 'Účastníci s diplomem a neodpovídajícím stavem účasti')
return errors return errors
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment