Merge pull request #5078 from FinnStutzenstein/fixMaster
Fixed typing from parse_qs
This commit is contained in:
commit
bcba878e18
1
.gitignore
vendored
1
.gitignore
vendored
@ -75,6 +75,7 @@ client/typings
|
|||||||
client/yarn.lock
|
client/yarn.lock
|
||||||
package-lock.json
|
package-lock.json
|
||||||
client/package-lock.json
|
client/package-lock.json
|
||||||
|
cypress.json
|
||||||
|
|
||||||
# System Files
|
# System Files
|
||||||
client/.DS_Store
|
client/.DS_Store
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import time
|
import time
|
||||||
from collections import defaultdict
|
from collections import defaultdict
|
||||||
from typing import Any, Dict, List, Optional
|
from typing import Any, Dict, List, Optional, cast
|
||||||
from urllib.parse import parse_qs
|
from urllib.parse import parse_qs
|
||||||
|
|
||||||
from channels.generic.websocket import AsyncWebsocketConsumer
|
from channels.generic.websocket import AsyncWebsocketConsumer
|
||||||
@ -55,7 +55,9 @@ class SiteConsumer(ProtocollAsyncJsonWebsocketConsumer):
|
|||||||
logger.debug(f"connect: denied ({self._id})")
|
logger.debug(f"connect: denied ({self._id})")
|
||||||
return
|
return
|
||||||
|
|
||||||
query_string = parse_qs(self.scope["query_string"])
|
query_string = cast(
|
||||||
|
Dict[bytes, List[bytes]], parse_qs(self.scope["query_string"])
|
||||||
|
)
|
||||||
if b"change_id" in query_string:
|
if b"change_id" in query_string:
|
||||||
try:
|
try:
|
||||||
change_id = int(query_string[b"change_id"][0])
|
change_id = int(query_string[b"change_id"][0])
|
||||||
|
Loading…
Reference in New Issue
Block a user