Prepare GeoIntel for public release
Managed validation / Managed repository validation (pull_request) Successful in 1m46s
GeoIntel release gates / Compile, test, contracts and builds (pull_request) Successful in 1m51s
GeoIntel release gates / Python and npm vulnerability policy (pull_request) Successful in 20s
GeoIntel release gates / Production AI image, SBOM and container scan (pull_request) Successful in 15m3s
GeoIntel release gates / Deploy exact gated revision to Unraid (pull_request) Skipped

This commit is contained in:
Jens
2026-08-31 21:33:10 +02:00
parent dcd67b11d1
commit 2cdf9c99c6
195 changed files with 595 additions and 207595 deletions
+13
View File
@@ -6,6 +6,7 @@ from typing import Literal
from sqlalchemy.orm import Session
from app.core.errors import AppError
from app.core.public_demo import is_public_demo_project
from app.models import Project
from app.schemas.project import ProjectCreate, ProjectRead, ProjectUpdate
@@ -50,6 +51,12 @@ class ProjectService:
@staticmethod
def update_project(db: Session, project_id: uuid.UUID, payload: ProjectUpdate) -> ProjectRead | None:
if is_public_demo_project(project_id):
raise AppError(
code="PUBLIC_DEMO_IMMUTABLE",
message="The public demo project identity cannot be edited.",
status_code=409,
)
project = db.get(Project, project_id)
if not project or project.status == "deleted":
return None
@@ -71,6 +78,12 @@ class ProjectService:
@staticmethod
def delete_project(db: Session, project_id: uuid.UUID) -> bool:
if is_public_demo_project(project_id):
raise AppError(
code="PUBLIC_DEMO_IMMUTABLE",
message="The public demo project identity cannot be deleted.",
status_code=409,
)
project = db.get(Project, project_id)
if not project or project.status == "deleted":
return False