From d40a33b7329d7b99f8965b029665929f968c35ba Mon Sep 17 00:00:00 2001 From: Hassan Abouelela Date: Sat, 19 Jun 2021 20:35:13 +0300 Subject: Updates Unittest Filter To Match New Model Signed-off-by: Hassan Abouelela --- backend/routes/forms/unittesting.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'backend') diff --git a/backend/routes/forms/unittesting.py b/backend/routes/forms/unittesting.py index bd14edf..a830775 100644 --- a/backend/routes/forms/unittesting.py +++ b/backend/routes/forms/unittesting.py @@ -25,7 +25,7 @@ def filter_unittests(form: Form) -> Form: This is used to redact the exact tests when sending the form back to the frontend. """ for question in form.questions: - if question.type == "code" and "unittests" in question.data: + if question.type == "code" and question.data["unittests"] is not None: question.data["unittests"]["tests"] = len(question.data["unittests"]["tests"]) return form -- cgit v1.2.3