Fix 'postgresql:' database URL check

This commit is contained in:
Tom Christie 2018-12-05 11:35:30 +00:00
parent 96213e569c
commit a4aacf7076
1 changed files with 1 additions and 1 deletions

View File

@ -27,7 +27,7 @@ class DatabaseMiddleware:
def get_backend(self, database_url: typing.Union[str, URL]) -> DatabaseBackend:
if isinstance(database_url, str):
database_url = URL(database_url)
assert database_url.scheme == "postgres"
assert database_url.scheme == "postgresql"
from starlette.database.postgres import PostgresBackend
return PostgresBackend(database_url)