From 19383549323af10b18bcd13e1de0c6af5b5a629b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ji=C5=99=C3=AD=20Setni=C4=8Dka?= <setnicka@seznam.cz>
Date: Sun, 21 Feb 2021 23:59:56 +0100
Subject: [PATCH] =?UTF-8?q?Bodov=C3=A1n=C3=AD:=20Fix=20toho,=20=C5=BEe=20n?=
=?UTF-8?q?elze=20vyplnit=20pr=C3=A1zdn=C3=A9=20body?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Omylem zmizelo při velkém předělávání tabulek
---
mo/web/org_contest.py | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/mo/web/org_contest.py b/mo/web/org_contest.py
index 98546219..9bc9872a 100644
--- a/mo/web/org_contest.py
+++ b/mo/web/org_contest.py
@@ -972,9 +972,7 @@ def org_contest_task(contest_id: int, task_id: int, site_id: Optional[int] = Non
if sol is None:
continue
points = request.form.get(f"points_{sol.user_id}", type=int)
- if points is None:
- continue
- if points < 0:
+ if points and points < 0:
flash('Nelze zadat záporné body', 'danger')
ok = False
break
--
GitLab