aboutsummaryrefslogtreecommitdiffstats
path: root/backend
diff options
context:
space:
mode:
Diffstat (limited to 'backend')
-rw-r--r--backend/routes/forms/unittesting.py2
1 files changed, 1 insertions, 1 deletions
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