emile 10 months ago
parent 0043191e7e
commit 179d9736a8

Binary file not shown.

@ -48,11 +48,12 @@ class OnlineUserConsumer(WebsocketConsumer):
online_users_ids = [connection.user.id for connection in online_connections]
customer_connections = []
staff_connections = []
for connectiontyyt in sorted_connections:
if hasattr(connectiontyyt.user, 'customerprofile'):
customer_connections.append(connectiontyyt)
elif hasattr(connectiontyyt.user, 'staffprofile'):
staff_connections.append(connectiontyyt)
# 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,

Loading…
Cancel
Save