From 034d53beef3a0bb2174013dd2f3c7663314a83b0 Mon Sep 17 00:00:00 2001 From: emile Date: Thu, 11 Jul 2024 20:57:08 +0300 Subject: [PATCH] new --- osinaweb/db.sqlite3 | Bin 1560576 -> 1560576 bytes .../__pycache__/consumers.cpython-310.pyc | Bin 5253 -> 5377 bytes osinaweb/osinacore/consumers.py | 6 +++++- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/osinaweb/db.sqlite3 b/osinaweb/db.sqlite3 index b429873c5498fe699820cc68d6c053cb175da20b..c296b835b8c8081c67c0f5594fb29185e756b843 100644 GIT binary patch delta 88 zcmV~$u@!8Y1M{0oBq1%u`x3WC6wUVVzrZNY~$vsSFTiYvPk z4wS``=4dXrq%Q^55e~X+FXAwl=8Oh590Yy<5iR`a3OGo?*`dl41`&rmU7}Wv!It~kEzQj8m7F`}on|w)NMIeXY60qzF zF4_{YGS6-ESS<_N2y2_HaK9`)Re2TOH~6Zisy1E^nSBsE-CDJlos3f~Sf04xVQguxL3Tm?h{l`f|p(^;{}ZScVG$t}PTV3@&B$Z60? zz!Shjz$3s(`FnIPRD-7JuTbyE9oRSmxC=M~FaXnlYTdr_i%+q@C|fq{@R3ZA}cVnTJPuLHR=rlCz+j8T^YaG6l9jR6m<*U>-9< zf42YfO2To;$z!uf=Hb9`L)85yJ!Rny+7_RPZsj5233=3rGr+6G?=wAF1 V8lqC78>Q&GcmthDGz$ZX#=q+?<}CmK delta 917 zcmZ{j-%Aux6vyYx@0lHES9ft2UCq>j2|~h3`=Po1=$B<~X^}sYt-JXnbLH+R2_vwo1xBC;8nd_6b<@`aX~9@9H-JR~b3+D+NjD_V z!IJ(JSB*Ka@UzjL;<{LX*9(;GSzcIKo+;*+m}lWJb2QRL-%b)v;4`zWu31PM97sb9 zTu{Y}AIxkIdCW`evM(_RWF~LP>xxJYzPzI_B~Sv`QJFd`?aEBsR(65uTkyLaV+5aA z*#=7VQYqW{)%=n_zlZ=_L2%~bDn4)qU~KQT(+252;a*v=UnnoaDV|3O-MC*WExDVboJ zj?Ra1-`x~7`_V)C2svNF=h37-PjVFBMl(%qBWu2uq1xosLHs OS`tb8lxS5liKbtK3$IcD diff --git a/osinaweb/osinacore/consumers.py b/osinaweb/osinacore/consumers.py index 66ea2529..c40d479b 100644 --- a/osinaweb/osinacore/consumers.py +++ b/osinaweb/osinacore/consumers.py @@ -48,6 +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'): + customer_connections.append(connection) event = { 'type': 'online_user_connection_handler', @@ -61,7 +64,8 @@ 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({