Skip to content
Snippets Groups Projects

Oprava nekonzistence mezi seznamem účastníků kola a soutěže

Closed Jan Prachař requested to merge honza/kolo-vs-soutez into master
2 files
+ 9
9
Compare changes
  • Side-by-side
  • Inline
Files
2
+ 9
6
@@ -301,7 +301,8 @@ def org_round_task_batch_points(round_id: int, task_id: int):
@app.route('/org/contest/r/<int:id>/list', methods=('GET', 'POST'))
def org_round_list(id: int):
round, rr = get_round_rr(id, Right.manage_contest, True)
round, rr = get_round_rr(id, None, True)
can_edit = rr.have_right(Right.manage_contest)
format = request.args.get('format', "")
filter = ParticipantsFilterForm(request.args)
@@ -314,16 +315,18 @@ def org_round_list(id: int):
participation_state=filter.f_participation_state,
)
action_form = ParticipantsActionForm()
if action_form.do_action(round=round, query=query):
# Action happened, redirect
return redirect(request.url)
action_form = None
if can_edit:
action_form = ParticipantsActionForm()
if action_form.do_action(round=round, query=query):
# Action happened, redirect
return redirect(request.url)
if format == "":
(count, query) = filter.apply_limits(query, pagesize=50)
# count = db.get_count(query)
table = make_contestant_table(query, add_contest_column=True, add_checkbox=True)
table = make_contestant_table(query, add_contest_column=True, add_checkbox=can_edit)
return render_template(
'org_round_list.html',
round=round,
Loading