From 5e963c64945a7e3b849d26f590025fd456a7187e Mon Sep 17 00:00:00 2001 From: cuom1999 Date: Thu, 2 Jun 2022 11:23:16 -0500 Subject: [PATCH] Fix io bug for problem raw --- judge/views/problem.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/judge/views/problem.py b/judge/views/problem.py index 7fd44a1..1035717 100644 --- a/judge/views/problem.py +++ b/judge/views/problem.py @@ -207,6 +207,12 @@ class ProblemRaw( context["problem_name"] = self.object.name context["url"] = self.request.build_absolute_uri() context["description"] = self.object.description + if hasattr(self.object, "data_files"): + context["fileio_input"] = self.object.data_files.fileio_input + context["fileio_output"] = self.object.data_files.fileio_output + else: + context["fileio_input"] = None + context["fileio_output"] = None return context def get(self, request, *args, **kwargs):