fix: fehlende SessionLocal, HTTPException, text Imports in canonical_control_routes
Build + Deploy / build-admin-compliance (push) Successful in 11s
Build + Deploy / build-backend-compliance (push) Successful in 8s
Build + Deploy / build-ai-sdk (push) Successful in 6s
Build + Deploy / build-developer-portal (push) Successful in 6s
Build + Deploy / build-tts (push) Successful in 7s
Build + Deploy / build-document-crawler (push) Successful in 6s
Build + Deploy / build-dsms-gateway (push) Successful in 6s
CI / branch-name (push) Has been skipped
CI / guardrail-integrity (push) Has been skipped
CI / loc-budget (push) Failing after 12s
CI / secret-scan (push) Has been skipped
CI / go-lint (push) Has been skipped
CI / python-lint (push) Has been skipped
CI / nodejs-lint (push) Has been skipped
CI / nodejs-build (push) Successful in 2m27s
CI / dep-audit (push) Has been skipped
CI / sbom-scan (push) Has been skipped
CI / test-go (push) Successful in 37s
Build + Deploy / trigger-orca (push) Has been cancelled
CI / test-python-document-crawler (push) Has been cancelled
CI / test-python-dsms-gateway (push) Has been cancelled
CI / validate-canonical-controls (push) Has been cancelled
CI / test-python-backend (push) Has been cancelled

SessionLocal: 5x verwendet fuer DB-Sessions ausserhalb Depends()
HTTPException: verwendet in Framework-Validation
text: 55x verwendet fuer raw SQL queries

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Benjamin Admin
2026-04-25 23:18:35 +02:00
parent 8f2cc3b93b
commit f785ff4d20
@@ -27,11 +27,12 @@ import json
import logging import logging
from typing import Any, Optional from typing import Any, Optional
from fastapi import APIRouter, Depends, Query from fastapi import APIRouter, Depends, HTTPException, Query
from sqlalchemy import text\
from sqlalchemy.orm import Session from sqlalchemy.orm import Session
from pydantic import BaseModel from pydantic import BaseModel
from classroom_engine.database import get_db from classroom_engine.database import get_db, SessionLocal
from compliance.api._http_errors import translate_domain_errors from compliance.api._http_errors import translate_domain_errors
from compliance.schemas.canonical_control import ( from compliance.schemas.canonical_control import (
ControlCreateRequest, ControlCreateRequest,