aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Hassan Abouelela <[email protected]>2021-06-19 20:35:13 +0300
committerGravatar Hassan Abouelela <[email protected]>2021-06-19 20:35:13 +0300
commitd40a33b7329d7b99f8965b029665929f968c35ba (patch)
treec882ed0250cc4d3b1fa2bddecbbd819caf9d0cf0
parentVerifies Unittest Error Responses (diff)
Updates Unittest Filter To Match New Model
Signed-off-by: Hassan Abouelela <[email protected]>
-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