@ -1398,6 +1398,19 @@ class Tournament(BaseModel):
return serializable_match_groups
def has_bracket(self):
main_rounds = self.round_set.filter(
parent=None,
group_stage_loser_bracket=False
)
count = main_rounds.count()
if count == 0:
return False
else:
return True
class MatchGroup:
def __init__(self, name, matches, formatted_schedule, round_id=None):
self.name = name
@ -1 +1 @@
0.1
1.2
@ -2,7 +2,7 @@
<a href="{% url 'tournament-info' tournament.id %}" class="topmargin5 orange">Informations</a>
{% if tournament.display_matches %}
{% if tournament.display_matches and tournament.has_bracket %}
<a href="{% url 'tournament-bracket' tournament.id %}" class="topmargin5 orange">Tableau</a>
{% endif %}