diff --git a/osinaweb/support/__pycache__/consumers.cpython-310.pyc b/osinaweb/support/__pycache__/consumers.cpython-310.pyc index 244f82f0..cb1dd8c2 100644 Binary files a/osinaweb/support/__pycache__/consumers.cpython-310.pyc and b/osinaweb/support/__pycache__/consumers.cpython-310.pyc differ 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