Skip to content
Snippets Groups Projects
Verified Commit 93d3a3f7 authored by Nik | Klampfradler's avatar Nik | Klampfradler
Browse files

Reformat

parent 70934322
No related branches found
No related tags found
1 merge request!2Resolve "Review tasks"
Pipeline #66005 failed
......@@ -287,13 +287,19 @@ class MatrixSpace(MatrixRoom):
def sync_children(self):
"""Sync membership of child spaces and rooms."""
current_children = self.get_children()
child_spaces = MatrixSpace.get_queryset().filter(
group__in=self.group.child_groups.filter(child_groups__isnull=False)
).values_list("room_id", flat=True)
child_rooms = MatrixRoom.get_queryset().filter(
Q(group__in=self.group.child_groups.filter(child_groups__isnull=True))
| Q(group=self.group)
).values_list("room_id", flat=True)
child_spaces = (
MatrixSpace.get_queryset()
.filter(group__in=self.group.child_groups.filter(child_groups__isnull=False))
.values_list("room_id", flat=True)
)
child_rooms = (
MatrixRoom.get_queryset()
.filter(
Q(group__in=self.group.child_groups.filter(child_groups__isnull=True))
| Q(group=self.group)
)
.values_list("room_id", flat=True)
)
child_ids = list(child_spaces) + list(child_rooms)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment