diff --git a/tournaments/models/round.py b/tournaments/models/round.py index 54d1c62..352435b 100644 --- a/tournaments/models/round.py +++ b/tournaments/models/round.py @@ -107,16 +107,16 @@ class Round(SideStoreModel): return True def prepare_match_group(self, next_round, parent_round, loser_final, double_butterfly_mode): - matches = self.match_set.filter(disabled=False).order_by('index') + matches = self.matches.filter(disabled=False).order_by('index') if len(matches) == 0: return None if next_round: - next_round_matches = next_round.match_set.filter(disabled=False).order_by('index') + next_round_matches = next_round.matches.filter(disabled=False).order_by('index') else: next_round_matches = [] if len(matches) < len(next_round_matches): - all_matches = self.match_set.order_by('index') + all_matches = self.matches.order_by('index') filtered_matches = [] # Process matches in pairs @@ -152,7 +152,7 @@ class Round(SideStoreModel): else: first_half_matches = list(matches) # Convert QuerySet to a list if self.index == 0 and loser_final: - loser_match = loser_final.match_set.first() + loser_match = loser_final.matches.first() if loser_match: first_half_matches.append(loser_match)