Actually, this should handle an empty list just fine and return False more directly

This commit is contained in:
Trenton H
2026-03-12 11:38:05 -07:00
parent 8cda8fb533
commit b7f54b69e7
+1 -4
View File
@@ -20,10 +20,7 @@ class StatusConsumer(AsyncWebsocketConsumer):
if user.is_superuser or user.id == owner_id or user.id in users_can_view:
return True
return (
groups_can_view
and await user.groups.filter(pk__in=groups_can_view).aexists()
)
return await user.groups.filter(pk__in=groups_can_view).aexists()
async def connect(self) -> None:
if not self._authenticated():