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:
@@ -17,7 +17,7 @@ from pydantic import BaseModel
|
||||
from sqlalchemy.orm import Session
|
||||
|
||||
from app.database import SessionLocal, get_db
|
||||
from app.dependencies.auth import get_current_user, require_role
|
||||
from app.dependencies.auth import require_role
|
||||
from app.models.user import User
|
||||
from app.services.mitre_sync_service import sync_mitre
|
||||
from app.services.intel_service import scan_intel
|
||||
|
||||
@@ -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