From 14c6706bf31dc3b2f04435d7cca349bd159acd90 Mon Sep 17 00:00:00 2001 From: "Pavel \"LEdoian\" Turinsky" Date: Sat, 24 Jun 2023 15:23:12 +0200 Subject: [PATCH] =?UTF-8?q?Pou=C5=BEijme=20konstantu,=20ne=20hardcodovan?= =?UTF-8?q?=C3=BD=20=C5=99et=C4=9Bzec?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- odevzdavatko/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/odevzdavatko/views.py b/odevzdavatko/views.py index 6f920474..5308df79 100644 --- a/odevzdavatko/views.py +++ b/odevzdavatko/views.py @@ -416,7 +416,7 @@ class NahrajReseniView(LoginRequiredMixin, CreateView): # Zaříznutí nezadaných problémů nadproblem_id = self.kwargs["nadproblem_id"] self.nadproblem = get_object_or_404(m.Problem, id=nadproblem_id) - if self.nadproblem.stav != "zadany": + if self.nadproblem.stav != m.Problem.STAV_ZADANY: raise PermissionDenied()