From d7904bb09560b4bac25818ce03e9ed45c53f7167 Mon Sep 17 00:00:00 2001 From: emile Date: Fri, 12 Jul 2024 14:35:01 +0300 Subject: [PATCH] new --- .../__pycache__/consumers.cpython-310.pyc | Bin 7759 -> 7759 bytes osinaweb/support/consumers.py | 6 +++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/osinaweb/support/__pycache__/consumers.cpython-310.pyc b/osinaweb/support/__pycache__/consumers.cpython-310.pyc index 244f82f04023a53da8b4be4964448eedfc3168f8..cb1dd8c234dda9cdae1e43ab1d31160dcbcc00fc 100644 GIT binary patch delta 23 dcmX?abKZt8pO=@50SIo2Oia_(-pJ=D2LMim1`q%M delta 23 dcmX?abKZt8pO=@50SJx?PfY9A+Q{c92LMn923`OF diff --git a/osinaweb/support/consumers.py b/osinaweb/support/consumers.py index 702c3af0..ca7b4417 100644 --- a/osinaweb/support/consumers.py +++ b/osinaweb/support/consumers.py @@ -107,7 +107,7 @@ class TicketRoomConsumer(WebsocketConsumer): def update_handler(self, event): update_id = event['update_id'] - update = TicketUpdate.objects.get(id=update_id) + update = TicketUpdate.objects.get(id=update_id) #No need for serialize because in the context of the method not in the event data context = { 'update': update, 'user': self.user @@ -185,8 +185,8 @@ class TicketRoomConsumer(WebsocketConsumer): 'last_name': conn.user.last_name, 'image': conn.user.staffprofile.image.url if hasattr(conn.user, 'staffprofile') and conn.user.staffprofile.image else None, 'date': conn.date.isoformat() if conn.date else None, - } for conn in connections - ] + } for conn in connections + ] #Everything included in a webscoket's event data needs to be serialized } async_to_sync(self.channel_layer.group_send)( self.ticket_number, event