fix: include wait-for-db.sh in Docker build context
The .dockerignore added in 8a0d82f incorrectly excluded wait-for-db.sh,
but the Dockerfile copies it as the container entrypoint. This caused
the Docker build to fail with 'failed to compute cache key: not found'.
Quality gates: verified file exists, py_compile passed.
This commit is contained in:
@@ -40,4 +40,3 @@ docs/
|
|||||||
|
|
||||||
# Scripts not needed in container
|
# Scripts not needed in container
|
||||||
scripts/
|
scripts/
|
||||||
wait-for-db.sh
|
|
||||||
|
|||||||
@@ -845,6 +845,7 @@ async def resolve_default_profile(
|
|||||||
# Default profile management
|
# Default profile management
|
||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
class DefaultProfilesUpdate(BaseModel):
|
class DefaultProfilesUpdate(BaseModel):
|
||||||
default_profiles: dict[str, str] = Field(
|
default_profiles: dict[str, str] = Field(
|
||||||
description="Mapping of tool_type_id -> profile_id for default profiles"
|
description="Mapping of tool_type_id -> profile_id for default profiles"
|
||||||
@@ -935,9 +936,7 @@ async def get_default_profile_for_tool_type_endpoint(
|
|||||||
select(UserConfig).where(UserConfig.user_id == user_id)
|
select(UserConfig).where(UserConfig.user_id == user_id)
|
||||||
)
|
)
|
||||||
user_config = result.scalar_one_or_none()
|
user_config = result.scalar_one_or_none()
|
||||||
profile_id = (
|
profile_id = user_config.default_profiles.get(tool_type_id) if user_config else None
|
||||||
user_config.default_profiles.get(tool_type_id) if user_config else None
|
|
||||||
)
|
|
||||||
return {"tool_type_id": tool_type_id, "profile_id": profile_id}
|
return {"tool_type_id": tool_type_id, "profile_id": profile_id}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -14,8 +14,12 @@ if TYPE_CHECKING:
|
|||||||
class UserConfig(UUIDPrimaryKeyMixin, TimestampMixin, Base):
|
class UserConfig(UUIDPrimaryKeyMixin, TimestampMixin, Base):
|
||||||
__tablename__ = "user_configs"
|
__tablename__ = "user_configs"
|
||||||
|
|
||||||
user_id: Mapped[uuid.UUID] = mapped_column(UUID(), ForeignKey("users.id"), nullable=False, unique=True)
|
user_id: Mapped[uuid.UUID] = mapped_column(
|
||||||
config: Mapped[dict[str, object]] = mapped_column(JSON, default=dict, nullable=False)
|
UUID(), ForeignKey("users.id"), nullable=False, unique=True
|
||||||
|
)
|
||||||
|
config: Mapped[dict[str, object]] = mapped_column(
|
||||||
|
JSON, default=dict, nullable=False
|
||||||
|
)
|
||||||
|
|
||||||
user: Mapped["User"] = relationship(back_populates="user_config")
|
user: Mapped["User"] = relationship(back_populates="user_config")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user