Skip to content
Snippets Groups Projects
Commit 3298e112 authored by Martin Mareš's avatar Martin Mareš Committed by Jan Prachař
Browse files

Účastníci vidí zadání a novinky, byť ještě nemají potvrzenou přihlášku

parent 50e740e3
No related branches found
No related tags found
No related merge requests found
......@@ -269,8 +269,8 @@ def get_contest_pion(id: int, require_reg: bool = True) -> Tuple[db.Contest, db.
return contest, pion
def get_contest(id: int) -> db.Contest:
contest, _ = get_contest_pion(id)
def get_contest(id: int, require_reg: bool = True) -> db.Contest:
contest, _ = get_contest_pion(id, require_reg)
return contest
......@@ -313,7 +313,7 @@ def user_contest(id: int):
@app.route('/user/contest/<int:id>/news')
def user_contest_news(id: int):
sess = db.get_session()
contest = get_contest(id)
contest = get_contest(id, require_reg=False)
messages = sess.query(db.Message).filter_by(round_id=contest.round_id).order_by(db.Message.created_at).all()
......@@ -328,7 +328,7 @@ def user_contest_news(id: int):
@app.route('/user/contest/<int:id>/task-statement/zadani.pdf')
def user_task_statement(id: int):
contest = get_contest(id)
contest = get_contest(id, require_reg=False)
if not contest.ct_task_statement_available():
logger.warn(f'Účastník #{g.user.user_id} chce zadání, na které nemá právo')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment