|
|
|
|
@ -838,6 +838,7 @@ class Tournament(BaseModel): |
|
|
|
|
matches = [m for m in matches if m.should_appear() and |
|
|
|
|
(m.start_date is None or m.start_date <= future_threshold) and # Not starting in more than 1h |
|
|
|
|
(m.end_date is None or m.end_date >= past_threshold)] # Not finished for more than 1h |
|
|
|
|
matches.sort(key=lambda m: (m.start_date is not None)) # display started matches |
|
|
|
|
matches = matches[:16] |
|
|
|
|
matches.sort(key=lambda m: (m.start_date is None, m.end_date is not None, m.start_date, m.index)) |
|
|
|
|
|
|
|
|
|
|