Skip to content
Snippets Groups Projects
Commit 88860632 authored by Jan Prachař's avatar Jan Prachař
Browse files

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

parent 6058cac8
No related branches found
No related tags found
1 merge request!44Oprava nekonzistence mezi seznamem účastníků kola a soutěže
...@@ -301,7 +301,8 @@ def org_round_task_batch_points(round_id: int, task_id: int): ...@@ -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')) @app.route('/org/contest/r/<int:id>/list', methods=('GET', 'POST'))
def org_round_list(id: int): 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', "") format = request.args.get('format', "")
filter = ParticipantsFilterForm(request.args) filter = ParticipantsFilterForm(request.args)
...@@ -314,6 +315,8 @@ def org_round_list(id: int): ...@@ -314,6 +315,8 @@ def org_round_list(id: int):
participation_state=filter.f_participation_state, participation_state=filter.f_participation_state,
) )
action_form = None
if can_edit:
action_form = ParticipantsActionForm() action_form = ParticipantsActionForm()
if action_form.do_action(round=round, query=query): if action_form.do_action(round=round, query=query):
# Action happened, redirect # Action happened, redirect
...@@ -323,7 +326,7 @@ def org_round_list(id: int): ...@@ -323,7 +326,7 @@ def org_round_list(id: int):
(count, query) = filter.apply_limits(query, pagesize=50) (count, query) = filter.apply_limits(query, pagesize=50)
# count = db.get_count(query) # 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( return render_template(
'org_round_list.html', 'org_round_list.html',
round=round, round=round,
......
...@@ -47,7 +47,4 @@ ...@@ -47,7 +47,4 @@
{% include 'parts/org_participants_table_actions.html' %} {% include 'parts/org_participants_table_actions.html' %}
<br>
<i>Upozornění: Můžete editovat jen účastníky soutěžící v oblastech, ke kterým máte právo.</i>
{% endblock %} {% endblock %}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment