Skip to content

Commit 5d0da6b

Browse files
committed
use Request to generate the state
1 parent 8b67d41 commit 5d0da6b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

backend/middleware.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ async def __call__(self, scope: Scope, receive: Receive, send: Send) -> None:
1818
ssl_cert_reqs=ssl.CERT_NONE
1919
)
2020
db = client[MONGO_DATABASE]
21-
scope["state"].db = db
21+
Request(scope).state.db = db
2222
await self._app(scope, receive, send)
2323

2424

0 commit comments

Comments
 (0)