|
|
|
@ -57,7 +57,7 @@ class GroupStage(SideStoreModel): |
|
|
|
return [ts.match for ts in team_scores] # map(lambda ts: ts.match, team_scores) |
|
|
|
return [ts.match for ts in team_scores] # map(lambda ts: ts.match, team_scores) |
|
|
|
|
|
|
|
|
|
|
|
def live_group_stages(self): |
|
|
|
def live_group_stages(self): |
|
|
|
lgs = LiveGroupStage(self.display_name(), self.step, self.index) |
|
|
|
lgs = LiveGroupStage(self.id, self.display_name(), self.step, self.index) |
|
|
|
gs_teams = {} |
|
|
|
gs_teams = {} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -165,7 +165,8 @@ class GroupStage(SideStoreModel): |
|
|
|
return len(matches) > 0 and all(match.end_date is not None for match in matches) |
|
|
|
return len(matches) > 0 and all(match.end_date is not None for match in matches) |
|
|
|
|
|
|
|
|
|
|
|
class LiveGroupStage: |
|
|
|
class LiveGroupStage: |
|
|
|
def __init__(self, title, step, index): |
|
|
|
def __init__(self, id, title, step, index): |
|
|
|
|
|
|
|
self.id = id |
|
|
|
self.title = title |
|
|
|
self.title = title |
|
|
|
self.teams = [] |
|
|
|
self.teams = [] |
|
|
|
self.start = None |
|
|
|
self.start = None |
|
|
|
@ -194,6 +195,7 @@ class LiveGroupStage: |
|
|
|
|
|
|
|
|
|
|
|
def to_dict(self): |
|
|
|
def to_dict(self): |
|
|
|
return { |
|
|
|
return { |
|
|
|
|
|
|
|
"id": self.id, |
|
|
|
"title": self.title, |
|
|
|
"title": self.title, |
|
|
|
"teams": [team.to_dict() for team in self.teams], |
|
|
|
"teams": [team.to_dict() for team in self.teams], |
|
|
|
"duration": self.formatted_duration(), |
|
|
|
"duration": self.formatted_duration(), |
|
|
|
|