diff --git a/mo/web/org_contest.py b/mo/web/org_contest.py index 9722073accbbb985a4cffd08a890530a8116b6d5..6f57771b00183fcb951ee0008b49c39383bcd3ef 100644 --- a/mo/web/org_contest.py +++ b/mo/web/org_contest.py @@ -1370,7 +1370,7 @@ def org_generic_batch_upload(task_id: int, round_id: Optional[int] = None, hier_ class BatchPointsForm(ImportForm): - add_del_sols = wtforms.BooleanField('Zakládat / mazat řešení', description='Xyzzy') + add_del_sols = wtforms.BooleanField('Zakládat / mazat řešení') @app.route('/org/contest/c/<int:ct_id>/task/<int:task_id>/batch-points', methods=('GET', 'POST')) @@ -1390,6 +1390,9 @@ def org_generic_batch_points(task_id: Optional[int] = None, round_id: Optional[i imp = None if form.validate_on_submit(): imp = PointsImport(user=g.user, round=round, only_region=hier_place, contest=contest, task=task, allow_add_del=form.add_del_sols.data) + else: + if request.args.get('add_del', '1') == '1': + form.add_del_sols.data = True return generic_import_page( form, imp, ctx.url_home(), template='org_generic_batch_points.html',