|
|
|
@ -68,7 +68,7 @@ class Round(models.Model): |
|
|
|
|
|
|
|
|
|
|
|
# Recursively fetch matches from child rounds |
|
|
|
# Recursively fetch matches from child rounds |
|
|
|
# Sort children by depth in ascending order (deeper rounds last) |
|
|
|
# Sort children by depth in ascending order (deeper rounds last) |
|
|
|
sorted_children = sorted(self.children.all(), key=lambda child: child.get_depth()) |
|
|
|
sorted_children = sorted(self.children.all(), key=lambda child: (child.index, child.get_depth())) |
|
|
|
|
|
|
|
|
|
|
|
for child_round in sorted_children: |
|
|
|
for child_round in sorted_children: |
|
|
|
matches.extend(child_round.get_matches_recursive(hide_empty_matches)) |
|
|
|
matches.extend(child_round.get_matches_recursive(hide_empty_matches)) |
|
|
|
|