Explorar el Código

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

tags/1.7.2
-LAN- hace 2 meses
padre
commit
aaf9fc1562
No account linked to committer's email address
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2
    1
      api/configs/middleware/__init__.py

+ 2
- 1
api/configs/middleware/__init__.py Ver fichero

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

Cargando…
Cancelar
Guardar