|
|
|
@ -390,7 +390,7 @@ class Match(models.Model): |
|
|
|
ended = self.end_date is not None |
|
|
|
ended = self.end_date is not None |
|
|
|
live_format = "Format " + FederalMatchCategory(self.format).format_label_short |
|
|
|
live_format = "Format " + FederalMatchCategory(self.format).format_label_short |
|
|
|
|
|
|
|
|
|
|
|
livematch = LiveMatch(title, date, time_indication, court, self.started(), ended, group_stage_name, live_format, self.start_date, self.court_index, self.disabled, self.index) |
|
|
|
livematch = LiveMatch(title, date, time_indication, court, self.started(), ended, group_stage_name, live_format, self.start_date, self.court_index, self.disabled) |
|
|
|
|
|
|
|
|
|
|
|
for team in self.live_teams(): |
|
|
|
for team in self.live_teams(): |
|
|
|
livematch.add_team(team) |
|
|
|
livematch.add_team(team) |
|
|
|
@ -447,7 +447,7 @@ class Team: |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
class LiveMatch: |
|
|
|
class LiveMatch: |
|
|
|
def __init__(self, title, date, time_indication, court, started, ended, group_stage_name, format, start_date, court_index, disabled, index): |
|
|
|
def __init__(self, title, date, time_indication, court, started, ended, group_stage_name, format, start_date, court_index, disabled): |
|
|
|
self.title = title |
|
|
|
self.title = title |
|
|
|
self.date = date |
|
|
|
self.date = date |
|
|
|
self.teams = [] |
|
|
|
self.teams = [] |
|
|
|
@ -461,7 +461,6 @@ class LiveMatch: |
|
|
|
self.disabled = disabled |
|
|
|
self.disabled = disabled |
|
|
|
self.start_date = start_date |
|
|
|
self.start_date = start_date |
|
|
|
self.court_index = court_index |
|
|
|
self.court_index = court_index |
|
|
|
self.index = index |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def add_team(self, team): |
|
|
|
def add_team(self, team): |
|
|
|
self.teams.append(team) |
|
|
|
self.teams.append(team) |
|
|
|
@ -482,8 +481,7 @@ class LiveMatch: |
|
|
|
"format": self.format, |
|
|
|
"format": self.format, |
|
|
|
"disabled": self.disabled, |
|
|
|
"disabled": self.disabled, |
|
|
|
"start_date": self.start_date, |
|
|
|
"start_date": self.start_date, |
|
|
|
"court_index": self.court_index, |
|
|
|
"court_index": self.court_index |
|
|
|
"index": self.index |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
def show_time_indication(self): |
|
|
|
def show_time_indication(self): |
|
|
|
|