瀏覽代碼
fix: add @property decorator to pydantic computed_field for compatibility (#23728)
tags/1.7.2
-LAN-
2 月之前
No account linked to committer's email address
|
|
|
|
|
|
|
|
default="postgresql", |
|
|
default="postgresql", |
|
|
) |
|
|
) |
|
|
|
|
|
|
|
|
@computed_field |
|
|
|
|
|
|
|
|
@computed_field # type: ignore[misc] |
|
|
|
|
|
@property |
|
|
def SQLALCHEMY_DATABASE_URI(self) -> str: |
|
|
def SQLALCHEMY_DATABASE_URI(self) -> str: |
|
|
db_extras = ( |
|
|
db_extras = ( |
|
|
f"{self.DB_EXTRAS}&client_encoding={self.DB_CHARSET}" if self.DB_CHARSET else self.DB_EXTRAS |
|
|
f"{self.DB_EXTRAS}&client_encoding={self.DB_CHARSET}" if self.DB_CHARSET else self.DB_EXTRAS |