diff --git a/tournaments/models/tournament.py b/tournaments/models/tournament.py index 06ff2d4..e3e93fb 100644 --- a/tournaments/models/tournament.py +++ b/tournaments/models/tournament.py @@ -341,7 +341,7 @@ class Tournament(models.Model): # print(f"Group stage members count: {group_stage_members_count}") if self.team_sorting == TeamSortingType.INSCRIPTION_DATE: - complete_teams.sort(key=lambda s: (s.date is None, s.date or datetime.min, s.initial_weight, s.team_registration.id)) + complete_teams.sort(key=lambda s: (s.registration_date is None, s.registration_date or datetime.min, s.initial_weight, s.team_registration.id)) else: complete_teams.sort(key=lambda s: (s.initial_weight, s.team_registration.id)) @@ -370,7 +370,7 @@ class Tournament(models.Model): if waiting_list_count > 0: waiting_teams = waiting_teams + complete_teams[-waiting_list_count:] if self.team_sorting == TeamSortingType.INSCRIPTION_DATE: - waiting_teams.sort(key=lambda s: (s.date is None, s.date or datetime.min, s.initial_weight, s.team_registration.id)) + waiting_teams.sort(key=lambda s: (s.registration_date is None, s.registration_date or datetime.min, s.initial_weight, s.team_registration.id)) else: waiting_teams.sort(key=lambda s: (s.initial_weight, s.team_registration.id)) else: @@ -936,7 +936,7 @@ class TeamSummon: class TeamItem: def __init__(self, team_registration): self.names = team_registration.team_names() - self.date = team_registration.local_call_date() + self.registration_date = team_registration.registration_date self.weight = team_registration.weight self.initial_weight = team_registration.initial_weight() self.image = team_registration.logo @@ -951,7 +951,7 @@ class TeamItem: def to_dict(self): return { "names": self.names, - "date": self.date, + "registration_date": self.registration_date, "weight": self.weight, "initial_weight": self.initial_weight, "image": self.image, diff --git a/tournaments/templates/tournaments/team_row.html b/tournaments/templates/tournaments/team_row.html index 09867b8..a9c71ef 100644 --- a/tournaments/templates/tournaments/team_row.html +++ b/tournaments/templates/tournaments/team_row.html @@ -12,6 +12,10 @@
{{ name }}
{% endfor %} + {% else %} +
+
Bloqué
+
{% endif %} {% if tournament.hide_teams_weight %}