Fix packaged project archive command
GeoIntel CI / docs-smoke (push) Canceled after 0s
GeoIntel CI / contract-smoke (push) Canceled after 0s

This commit is contained in:
Codex
2026-07-17 14:24:13 +02:00
parent 78a5f0b0b2
commit dbc28c8916
2 changed files with 25 additions and 0 deletions
+9
View File
@@ -2,12 +2,21 @@ from __future__ import annotations
import argparse
import json
from pathlib import Path
import re
import sys
from dataclasses import dataclass
from uuid import UUID
from sqlalchemy.orm import Session
# Direct execution from /app/scripts must resolve the repository's backend
# package before similarly named installed packages.
ROOT = Path(__file__).resolve().parents[1]
BACKEND_ROOT = ROOT / "backend" if (ROOT / "backend" / "app").is_dir() else ROOT
if str(BACKEND_ROOT) not in sys.path:
sys.path.insert(0, str(BACKEND_ROOT))
from app.db.session import SessionLocal
from app.models import Project