|
|
@ -289,7 +289,7 @@ class ResitelReseniView(DetailView): |
|
|
|
def get_context_data(self, **kw): |
|
|
|
ctx = super().get_context_data(**kw) |
|
|
|
hodnoceni = self.aktualni_hodnoceni() |
|
|
|
if self.request.user not in self.reseni.resitele.all(): |
|
|
|
if not self.reseni.resitele.filter(osoba__user=self.request.user).exists(): |
|
|
|
raise PermissionDenied() |
|
|
|
# ctx['poznamka'] = f.PoznamkaReseniForm(instance=self.reseni) |
|
|
|
ctx["hodnoceni"] = hodnoceni |
|
|
|