Skip to content

Commit

Permalink
refactor(channels/generic): short condition
Browse files Browse the repository at this point in the history
  • Loading branch information
cacosandon committed Sep 3, 2024
1 parent 26fdd81 commit e539976
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion channels/generic/websocket.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ async def websocket_receive(self, message):
Called when a WebSocket frame is received. Decodes it and passes it
to receive().
"""
if "text" in message and message["text"] is not None:
if message.get("text") is not None:
await self.receive(text_data=message["text"])
else:
await self.receive(bytes_data=message["bytes"])
Expand Down

0 comments on commit e539976

Please sign in to comment.