fix(ops): support API image path for T16 seed script
All checks were successful
Code Review / ai-code-review (push) Successful in 10s
All checks were successful
Code Review / ai-code-review (push) Successful in 10s
This commit is contained in:
@@ -20,9 +20,12 @@ import sys
|
||||
from dataclasses import asdict, dataclass
|
||||
from pathlib import Path
|
||||
|
||||
_REPO_API_ROOT = Path(__file__).resolve().parents[2] / "apps" / "api"
|
||||
if (_REPO_API_ROOT / "src").exists():
|
||||
sys.path.insert(0, str(_REPO_API_ROOT))
|
||||
_IMAGE_API_ROOT = Path(__file__).resolve().parents[2]
|
||||
_REPO_API_ROOT = _IMAGE_API_ROOT / "apps" / "api"
|
||||
for _api_root in (_IMAGE_API_ROOT, _REPO_API_ROOT):
|
||||
if (_api_root / "src").exists():
|
||||
sys.path.insert(0, str(_api_root))
|
||||
break
|
||||
|
||||
from src.models.playbook import (
|
||||
ActionType,
|
||||
|
||||
Reference in New Issue
Block a user