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

This commit is contained in:
kitos
2026-06-25 12:22:58 +02:00
parent 006bdc60e1
commit 6e29c7081f
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -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
+2 -2
View File
@@ -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.",