|
|
|
|
@ -434,7 +434,7 @@ class Match(SideStoreModel): |
|
|
|
|
ended = self.end_date is not None |
|
|
|
|
live_format = "Format " + FederalMatchCategory(self.format).format_label_short |
|
|
|
|
|
|
|
|
|
livematch = LiveMatch(self.index, title, date, time_indication, court, self.started(), ended, group_stage_name, live_format, self.start_date, self.court_index, self.disabled, bracket_name) |
|
|
|
|
livematch = LiveMatch(self.index, title, date, time_indication, court, self.started(), ended, group_stage_name, live_format, self.start_date, self.court_index, self.disabled, bracket_name, self.should_show_lucky_loser_status()) |
|
|
|
|
|
|
|
|
|
for team in self.live_teams(): |
|
|
|
|
livematch.add_team(team) |
|
|
|
|
@ -447,6 +447,12 @@ class Match(SideStoreModel): |
|
|
|
|
else: |
|
|
|
|
return self.team_scores.order_by('team_registration__bracket_position') |
|
|
|
|
|
|
|
|
|
def should_show_lucky_loser_status(self): |
|
|
|
|
if self.group_stage is not None: |
|
|
|
|
return False |
|
|
|
|
if self.round and self.round.parent is None and self.round.group_stage_loser_bracket is False: |
|
|
|
|
return True |
|
|
|
|
return False |
|
|
|
|
# def non_null_start_date(self): |
|
|
|
|
# if self.start_date: |
|
|
|
|
# return self.start_date |
|
|
|
|
@ -495,7 +501,7 @@ class Team: |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
class LiveMatch: |
|
|
|
|
def __init__(self, index, title, date, time_indication, court, started, ended, group_stage_name, format, start_date, court_index, disabled, bracket_name): |
|
|
|
|
def __init__(self, index, title, date, time_indication, court, started, ended, group_stage_name, format, start_date, court_index, disabled, bracket_name, should_show_lucky_loser_status): |
|
|
|
|
self.index = index |
|
|
|
|
self.title = title |
|
|
|
|
self.date = date |
|
|
|
|
@ -511,6 +517,7 @@ class LiveMatch: |
|
|
|
|
self.start_date = start_date |
|
|
|
|
self.court_index = court_index |
|
|
|
|
self.bracket_name = bracket_name |
|
|
|
|
self.should_show_lucky_loser_status = should_show_lucky_loser_status |
|
|
|
|
|
|
|
|
|
def add_team(self, team): |
|
|
|
|
self.teams.append(team) |
|
|
|
|
@ -532,7 +539,8 @@ class LiveMatch: |
|
|
|
|
"format": self.format, |
|
|
|
|
"disabled": self.disabled, |
|
|
|
|
"court_index": self.court_index, |
|
|
|
|
"bracket_name": self.bracket_name |
|
|
|
|
"bracket_name": self.bracket_name, |
|
|
|
|
"should_show_lucky_loser_status": self.should_show_lucky_loser_status, |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
def show_time_indication(self): |
|
|
|
|
|