diff options
author | 2021-02-25 14:44:26 +0100 | |
---|---|---|
committer | 2021-02-25 14:44:26 +0100 | |
commit | 06c01e78abcb0ab8713a3ad375218e98aab2882f (patch) | |
tree | d65154d1812ca70c1163491bb7037880bdeb3d61 /backend/routes | |
parent | Only filter units if we aren't using an admin token (diff) |
Remove unneeded temp variable
Diffstat (limited to 'backend/routes')
-rw-r--r-- | backend/routes/forms/submit.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/backend/routes/forms/submit.py b/backend/routes/forms/submit.py index d6b549e..b3a6afd 100644 --- a/backend/routes/forms/submit.py +++ b/backend/routes/forms/submit.py @@ -132,12 +132,10 @@ class SubmitForm(Route): return JSONResponse(e.errors(), status_code=422) # Run unittests if needed - has_unittests = any("unittests" in question.data for question in form.questions) - if has_unittests: + if any("unittests" in question.data for question in form.questions): unittest_results = await execute_unittest(response_obj, form) - was_successful = all(test.passed for test in unittest_results) - if not was_successful: + if not all(test.passed for test in unittest_results): # Return 500 if we encountered an internal error (code 99). status_code = 500 if any( test.return_code == 99 for test in unittest_results |