Commit 17f141d6 by Chif Gergő

using hasattr in disconnect

parent fc599fbe
Pipeline #1093 passed with stage
in 1 minute 44 seconds
......@@ -31,7 +31,7 @@ class StatusConsumer(WebsocketConsumer):
# Unsubscribe from registered groups
def disconnect(self, close_code):
if self.user:
if hasattr(self, 'user'):
instances = Instance.objects.filter(created_by=self.user)
for inst in instances:
async_to_sync(self.channel_layer.group_discard)(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment