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

Účastnická část webu nehledá v DB zprávičky, jsou-li v kole vypnuté

parent 6c86c3d4
No related branches found
No related tags found
1 merge request!98Praktické úlohy a propojení s CMS
......@@ -379,7 +379,10 @@ def user_contest_task(contest_id: int, task_id: int):
task = get_task(contest, task_id)
sess = db.get_session()
if contest.round.has_messages:
messages = sess.query(db.Message).filter_by(round_id=contest.round_id).order_by(db.Message.created_at).all()
else:
messages = None
state = contest.ct_state()
if state == db.RoundState.preparing:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment