Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

fix: add @property decorator to pydantic computed_field for compatibility (#23728)

-LAN-aaf9fc156219
diff --git a/api/configs/middleware/__init__.py b/api/configs/middleware/__init__.py
index 4e228ab9329..ba8bbc71352 100644
--- a/api/configs/middleware/__init__.py
+++ b/api/configs/middleware/__init__.py
@@ -144,7 +144,8 @@ class DatabaseConfig(BaseSettings):
default="postgresql",
)
- @computed_field
+ @computed_field # type: ignore[misc]
+ @property
def SQLALCHEMY_DATABASE_URI(self) -> str:
db_extras = (
f"{self.DB_EXTRAS}&client_encoding={self.DB_CHARSET}" if self.DB_CHARSET else self.DB_EXTRAS