fix(lint): remove unused get_current_user import; lowercase HOLDABLE_STATES
Aegis CI / lint-and-test (push) Has been cancelled
Snyk Security Scan / Python vulnerabilities (backend) (push) Has been cancelled
Snyk Security Scan / npm vulnerabilities (frontend) (push) Has been cancelled
Snyk Security Scan / Docker image vulnerabilities (backend) (push) Has been cancelled
Aegis CI / lint-and-test (push) Has been cancelled
Snyk Security Scan / Python vulnerabilities (backend) (push) Has been cancelled
Snyk Security Scan / npm vulnerabilities (frontend) (push) Has been cancelled
Snyk Security Scan / Docker image vulnerabilities (backend) (push) Has been cancelled
This commit is contained in:
@@ -1139,8 +1139,8 @@ def hold_test(
|
||||
|
||||
test = crud_get_test_or_raise(db, test_id)
|
||||
|
||||
HOLDABLE_STATES = ("draft", "red_executing", "blue_evaluating")
|
||||
if test.state not in HOLDABLE_STATES:
|
||||
holdable_states = ("draft", "red_executing", "blue_evaluating")
|
||||
if test.state not in holdable_states:
|
||||
raise HTTPException(
|
||||
status_code=400,
|
||||
detail=f"Cannot hold a test in state '{test.state}'. Only pre-validation states can be held.",
|
||||
|
||||
Reference in New Issue
Block a user