fix tests

This commit is contained in:
hay-kot 2021-04-30 08:50:50 -08:00
commit 29caafa84e

View file

@ -117,7 +117,7 @@ class AppSettings(BaseSettings):
@validator("DB_URL", pre=True) @validator("DB_URL", pre=True)
def assemble_db_connection(cls, v: Optional[str], values: dict[str, Any]) -> Any: def assemble_db_connection(cls, v: Optional[str], values: dict[str, Any]) -> Any:
if isinstance(v, str): if isinstance(v, str) or v is None:
return determine_sqlite_path() return determine_sqlite_path()
return PostgresDsn.build( return PostgresDsn.build(
scheme="postgresql", scheme="postgresql",