|
|
|
@ -1984,9 +1984,19 @@ class Tournament(BaseModel): |
|
|
|
sorted_days = sorted(list(days)) |
|
|
|
sorted_days = sorted(list(days)) |
|
|
|
# Create match groups for the selected day |
|
|
|
# Create match groups for the selected day |
|
|
|
match_groups = [] |
|
|
|
match_groups = [] |
|
|
|
|
|
|
|
print(days) |
|
|
|
|
|
|
|
|
|
|
|
if all: |
|
|
|
if all: |
|
|
|
for selected_day in sorted_days: |
|
|
|
today = timezone.now().date() |
|
|
|
|
|
|
|
if today not in days: |
|
|
|
|
|
|
|
selected_day = sorted_days[0] if sorted_days else None |
|
|
|
|
|
|
|
else: |
|
|
|
|
|
|
|
# Default to first day if today is not in the list |
|
|
|
|
|
|
|
if self.has_ended(): |
|
|
|
|
|
|
|
selected_day = sorted_days[-1] |
|
|
|
|
|
|
|
else: |
|
|
|
|
|
|
|
selected_day = sorted_days[0] |
|
|
|
|
|
|
|
|
|
|
|
# Group matches by hour |
|
|
|
# Group matches by hour |
|
|
|
matches_by_hour = {} |
|
|
|
matches_by_hour = {} |
|
|
|
for match in matches_by_day[selected_day]: |
|
|
|
for match in matches_by_day[selected_day]: |
|
|
|
|