|
|
|
@ -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): |
|
|
|
|
|
|
|
if self.group_stage is None: |
|
|
|
return (self.start_date or self.end_date) and len(self.team_scores.all()) > 0 |
|
|
|
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): |
|
|
|
|
|
|
|
|
|
|
|
|