瀏覽代碼

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

tags/1.7.2
-LAN- 2 月之前
父節點
當前提交
aaf9fc1562
沒有連結到貢獻者的電子郵件帳戶。
共有 1 個檔案被更改,包括 2 行新增1 行删除
  1. 2
    1
      api/configs/middleware/__init__.py

+ 2
- 1
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

Loading…
取消
儲存