diff --git a/osinaweb/db.sqlite3 b/osinaweb/db.sqlite3 index 0e7b61e5..b429873c 100644 Binary files a/osinaweb/db.sqlite3 and b/osinaweb/db.sqlite3 differ diff --git a/osinaweb/osinacore/__pycache__/consumers.cpython-310.pyc b/osinaweb/osinacore/__pycache__/consumers.cpython-310.pyc index 66e5ad14..d6cc7a26 100644 Binary files a/osinaweb/osinacore/__pycache__/consumers.cpython-310.pyc and b/osinaweb/osinacore/__pycache__/consumers.cpython-310.pyc differ diff --git a/osinaweb/osinacore/consumers.py b/osinaweb/osinacore/consumers.py index 779b7bb0..66ea2529 100644 --- a/osinaweb/osinacore/consumers.py +++ b/osinaweb/osinacore/consumers.py @@ -48,11 +48,7 @@ class OnlineUserConsumer(WebsocketConsumer): online_users_ids = [connection.user.id for connection in online_connections] customer_connections = [] staff_connections = [] - for connection in sorted_connections: - if hasattr(connection.user, 'customerprofile'): - customer_connections.append(connection) - elif hasattr(connection.user, 'staffprofile'): - staff_connections.append(connection) + event = { 'type': 'online_user_connection_handler', 'staff_connections': staff_connections, @@ -65,8 +61,7 @@ class OnlineUserConsumer(WebsocketConsumer): def online_user_connection_handler(self, event): context = { - 'staff_connections': event['staff_connections'], - 'customer_connections': event['customer_connections'], + } html = render_to_string("details_templates/partials/recently-online.html", context=context) self.send(text_data=json.dumps({