Skip to content

Commit

Permalink
using dict() instead of copy() for scope
Browse files Browse the repository at this point in the history
  • Loading branch information
dantownsend committed Aug 13, 2019
1 parent 3bee368 commit dda1e86
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions piccolo_api/middleware/auth.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import copy
import typing as t
import time

Expand Down Expand Up @@ -103,7 +102,7 @@ async def __call__(self, scope, receive, send):
if not user_id:
raise HTTPException(status_code=403)

new_scope = copy.copy(scope)
new_scope = dict(scope)
new_scope['user_id'] = user_id

await self.asgi(new_scope, receive, send)

0 comments on commit dda1e86

Please sign in to comment.