From 2b0058ca4c9ddec48ea6371bd1182a70bedbaa5b Mon Sep 17 00:00:00 2001 From: cuom1999 Date: Fri, 17 Mar 2023 22:24:23 -0500 Subject: [PATCH] Fix bug when there's no data --- judge/views/problem.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/judge/views/problem.py b/judge/views/problem.py index 450f017..132b2d2 100644 --- a/judge/views/problem.py +++ b/judge/views/problem.py @@ -1194,7 +1194,9 @@ def problem_submit(request, problem, submission=None): "ACE_URL": settings.ACE_URL, "default_lang": default_lang, "problem_id": problem.id, - "output_only": problem.data_files.output_only, + "output_only": problem.data_files.output_only + if hasattr(problem, "data_files") + else False, }, )