parent
14c6706bf3
commit
24c790185e
1 changed files with 1 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue