From 14e636ff1c627c4fc776955ea643a7625e1a21bf Mon Sep 17 00:00:00 2001 From: Alex Blank Date: Wed, 3 Jun 2026 13:20:34 +0200 Subject: [PATCH] fix: import ToolDefinitionManifest at runtime in ToolType model Move the ToolDefinitionManifest import out of TYPE_CHECKING so SQLAlchemy can resolve the string-annotated relationship when configuring the ToolType mapper during startup. Quality gates: py_compile and ruff passed. --- apps/api/src/models/tool_type.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/api/src/models/tool_type.py b/apps/api/src/models/tool_type.py index 581228a..be635bf 100644 --- a/apps/api/src/models/tool_type.py +++ b/apps/api/src/models/tool_type.py @@ -6,8 +6,9 @@ from sqlalchemy.orm import Mapped, mapped_column, relationship from src.models.base import Base, TimestampMixin, UUIDPrimaryKeyMixin +from src.models.tool_definition_manifest import ToolDefinitionManifest + if TYPE_CHECKING: - from src.models.tool_definition_manifest import ToolDefinitionManifest from src.models.user import User