display groupstage match even if no start date

clubs
Razmig Sarkissian 1 year ago
parent fe1d8b7e82
commit 875613290c
  1. 6
      tournaments/models/match.py

@ -1,4 +1,5 @@
from django.db import models from django.db import models
from tournaments.models import group_stage
from . import Round, GroupStage, FederalMatchCategory from . import Round, GroupStage, FederalMatchCategory
from django.utils import timezone, formats from django.utils import timezone, formats
import uuid import uuid
@ -107,7 +108,10 @@ class Match(models.Model):
return False return False
def should_appear(self): def should_appear(self):
return (self.start_date or self.end_date) and len(self.team_scores.all()) > 0 if self.group_stage is None:
return (self.start_date or self.end_date) and len(self.team_scores.all()) > 0
else:
return len(self.team_scores.all()) > 0
def formatted_duration(self): def formatted_duration(self):

Loading…
Cancel
Save