aboutsummaryrefslogtreecommitdiffstats
path: root/backend/models/question.py
diff options
context:
space:
mode:
Diffstat (limited to 'backend/models/question.py')
-rw-r--r--backend/models/question.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/backend/models/question.py b/backend/models/question.py
index 8972bc1..5a1334a 100644
--- a/backend/models/question.py
+++ b/backend/models/question.py
@@ -15,7 +15,7 @@ class Unittests(BaseModel):
@validator("tests")
def validate_tests(cls, value: _TESTS_TYPE) -> _TESTS_TYPE:
"""Confirm that at least one test exists in a test suite."""
- if isinstance(value, dict) and not len(value.keys()):
+ if isinstance(value, dict) and len(value.keys()) == 0:
raise ValueError("Must have at least one test in a test suite.")
return value