Fix edit button in editorial page

This commit is contained in:
cuom1999 2023-04-28 11:42:03 -05:00
parent d4db6bc0be
commit 7565d6ff01

View file

@ -194,7 +194,7 @@ class ProblemSolution(
PageVoteDetailView, PageVoteDetailView,
BookMarkDetailView, BookMarkDetailView,
): ):
context_object_name = "problem" context_object_name = "solution"
template_name = "problem/editorial.html" template_name = "problem/editorial.html"
def get_title(self): def get_title(self):
@ -220,7 +220,7 @@ class ProblemSolution(
) and not self.request.user.has_perm("judge.see_private_solution"): ) and not self.request.user.has_perm("judge.see_private_solution"):
raise Http404() raise Http404()
context["solution"] = solution context["problem"] = self.problem
context["has_solved_problem"] = self.problem.id in self.get_completed_problems() context["has_solved_problem"] = self.problem.id in self.get_completed_problems()
return context return context