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

This commit is contained in:
-LAN- 2025-08-11 15:34:19 +08:00 committed by GitHub
parent d30f898274
commit aaf9fc1562
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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