Laurent 11 months ago
commit 01210e096c
  1. 8
      tournaments/models/tournament.py
  2. 4
      tournaments/templates/tournaments/team_row.html

@ -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:
@ -938,7 +938,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
@ -953,7 +953,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,

@ -12,6 +12,10 @@
<div>{{ name }}</div>
{% endfor %}
</div>
{% else %}
<div class="table-cell table-cell-large semibold">
<div>Bloqué</div>
</div>
{% endif %}
{% if tournament.hide_teams_weight %}
<div class="table-cell right horizontal-padding"></div>

Loading…
Cancel
Save