From 24c790185eefddfd77322c54109996bfe37790d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=C3=A1=C5=A1=20Havelka?= Date: Sat, 24 Jun 2023 17:48:49 +0200 Subject: [PATCH] =?UTF-8?q?Revert=20"Pokus=20o=20fix=20p=C3=A1du=20webu"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 10b2d112496a9d9582decce79384225734b21401. --- odevzdavatko/views.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/odevzdavatko/views.py b/odevzdavatko/views.py index 5308df79..15b87973 100644 --- a/odevzdavatko/views.py +++ b/odevzdavatko/views.py @@ -433,10 +433,7 @@ class NahrajReseniView(LoginRequiredMixin, CreateView): return super().get(request, *args, **kwargs) def get_initial(self): - #nadproblem_id = self.nadproblem.id - # Hotfix: nevím, proč nemáme self.nadproblem, ale občas nemáme. - nadproblem_id = self.kwargs["nadproblem_id"] - self.nadproblem = get_object_or_404(m.Problem, id=nadproblem_id) + nadproblem_id = self.nadproblem.id return { "nadproblem_id": nadproblem_id, "problem": [] if self.nadproblem.podproblem.filter(stav=m.Problem.STAV_ZADANY).exists() else nadproblem_id