diff --git a/osinaweb/osinacore/__pycache__/consumers.cpython-310.pyc b/osinaweb/osinacore/__pycache__/consumers.cpython-310.pyc index 4fcd6031..ba2191dc 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 67f53c27..2d5a2dc9 100644 --- a/osinaweb/osinacore/consumers.py +++ b/osinaweb/osinacore/consumers.py @@ -48,11 +48,9 @@ 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'): - print('hi') - elif hasattr(connection.user, 'staffprofile'): - print('bye') + customer_connections = [connection for connection in sorted_connections if hasattr(connection.user, 'customerprofile')] + staff_connections = [connection for connection in sorted_connections if hasattr(connection.user, 'staffprofile')] + event = { 'type': 'online_user_connection_handler', 'staff_connections': staff_connections,