From f937416fe9a71472faf53cb6e09a08519599cbb0 Mon Sep 17 00:00:00 2001 From: Asuka Minato Date: Sun, 20 Jul 2025 15:39:43 +0900 Subject: [PATCH] fix one optional --- api/models/dataset.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/api/models/dataset.py b/api/models/dataset.py index c49de58120..04d753ad44 100644 --- a/api/models/dataset.py +++ b/api/models/dataset.py @@ -47,7 +47,7 @@ class Dataset(Base): PROVIDER_LIST = ["vendor", "external", None] id = mapped_column(StringUUID, server_default=db.text("uuid_generate_v4()")) - tenant_id = mapped_column(StringUUID, nullable=False) + tenant_id: Mapped[str] = mapped_column(StringUUID) name: Mapped[str] = mapped_column(db.String(255)) description = mapped_column(db.Text, nullable=True) provider: Mapped[str] = mapped_column(db.String(255), server_default=db.text("'vendor'::character varying")) @@ -59,8 +59,8 @@ class Dataset(Base): created_at = mapped_column(db.DateTime, nullable=False, server_default=func.current_timestamp()) updated_by = mapped_column(StringUUID, nullable=True) updated_at = mapped_column(db.DateTime, nullable=False, server_default=func.current_timestamp()) - embedding_model: Mapped[Optional[str]] = mapped_column(db.String(255), nullable=True) - embedding_model_provider: Mapped[Optional[str]] = mapped_column(db.String(255), nullable=True) + embedding_model: Mapped[str] = mapped_column(db.String(255)) + embedding_model_provider: Mapped[str] = mapped_column(db.String(255)) collection_binding_id = mapped_column(StringUUID, nullable=True) retrieval_model = mapped_column(JSONB, nullable=True) built_in_field_enabled = mapped_column(db.Boolean, nullable=False, server_default=db.text("false"))