We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4a1b123 commit 70851ecCopy full SHA for 70851ec
openwisp_controller/geo/channels/consumers.py
@@ -31,8 +31,12 @@ def join_groups(self, user):
31
super().join_groups(user)
32
return
33
34
- self.group_names = []
+ self.group_name = []
35
for org in user.organizations_managed:
36
group = f"loci.mobile-location.organization.{org}"
37
- self.group_names.append(group)
+ self.group_name.append(group)
38
async_to_sync(self.channel_layer.group_add)(group, self.channel_name)
39
+
40
+ def disconnect(self, close_code):
41
+ for group in getattr(self, "group_name", []):
42
+ async_to_sync(self.channel_layer.group_discard)(group, self.channel_name)
0 commit comments