fix issue with broadcast

bracket-feature
Raz 10 months ago
parent d319206b70
commit f13b5ce39a
  1. 1
      tournaments/models/match.py
  2. 7
      tournaments/models/tournament.py

@ -360,7 +360,6 @@ class Team:
def to_dict(self): def to_dict(self):
return { return {
"id": self.id,
"image": self.image, "image": self.image,
"names": self.names, "names": self.names,
"scores": self.scores, "scores": self.scores,

@ -1206,7 +1206,7 @@ class MatchGroup:
class TeamSummon: class TeamSummon:
def __init__(self, id, names, date, weight, stage, court, image, day_duration): def __init__(self, id, names, date, weight, stage, court, image, day_duration):
self.id = id self.id = str(id)
self.names = names self.names = names
self.date = date self.date = date
self.weight = weight self.weight = weight
@ -1226,7 +1226,6 @@ class TeamSummon:
def to_dict(self): def to_dict(self):
return { return {
"id": self.id,
"names": self.names, "names": self.names,
"date": self.formatted_date(), "date": self.formatted_date(),
"weight": self.weight, "weight": self.weight,
@ -1266,7 +1265,7 @@ class TeamItem:
class TeamRanking: class TeamRanking:
def __init__(self, id, names, ranking, points, image): def __init__(self, id, names, ranking, points, image):
self.id = id self.id = str(id)
self.names = names self.names = names
self.ranking = ranking self.ranking = ranking
self.formatted_ranking = self.ordinal(ranking) self.formatted_ranking = self.ordinal(ranking)
@ -1288,7 +1287,6 @@ class TeamRanking:
return '' return ''
def ordinal(self, n): def ordinal(self, n):
suffixes = {1: 'er', 2: 'ème', 3: 'rd'}
if n == 1: if n == 1:
suffix = 'er' suffix = 'er'
else: else:
@ -1297,7 +1295,6 @@ class TeamRanking:
def to_dict(self): def to_dict(self):
return { return {
"id": self.id,
"names": self.names, "names": self.names,
"ranking": self.ranking, "ranking": self.ranking,
"formatted_ranking": self.formatted_ranking, "formatted_ranking": self.formatted_ranking,

Loading…
Cancel
Save