|
|
|
@ -546,7 +546,7 @@ class Tournament(models.Model): |
|
|
|
return False |
|
|
|
return False |
|
|
|
if self.publish_summons: |
|
|
|
if self.publish_summons: |
|
|
|
return True |
|
|
|
return True |
|
|
|
if datetime.now().date() >= self.start_date.date(): |
|
|
|
if datetime.now() >= self.start_date: |
|
|
|
return True |
|
|
|
return True |
|
|
|
return False |
|
|
|
return False |
|
|
|
|
|
|
|
|
|
|
|
@ -560,17 +560,19 @@ class Tournament(models.Model): |
|
|
|
|
|
|
|
|
|
|
|
first_group_stage_start_date = self.group_stage_start_date() |
|
|
|
first_group_stage_start_date = self.group_stage_start_date() |
|
|
|
if first_group_stage_start_date is None: |
|
|
|
if first_group_stage_start_date is None: |
|
|
|
return datetime.now().date() >= self.start_date.date() |
|
|
|
return datetime.now() >= self.start_date |
|
|
|
|
|
|
|
else: |
|
|
|
|
|
|
|
return datetime.now() >= first_group_stage_start_date |
|
|
|
|
|
|
|
|
|
|
|
group_stage_start_date = self.getEightAm(first_group_stage_start_date) |
|
|
|
# group_stage_start_date = self.getEightAm(first_group_stage_start_date) |
|
|
|
|
|
|
|
|
|
|
|
if group_stage_start_date < self.start_date: |
|
|
|
# if group_stage_start_date < self.start_date: |
|
|
|
group_stage_start_date = self.start_date |
|
|
|
# group_stage_start_date = self.start_date |
|
|
|
|
|
|
|
|
|
|
|
if datetime.now().date() >= group_stage_start_date.date(): |
|
|
|
# if datetime.now().date() >= group_stage_start_date.date(): |
|
|
|
return True |
|
|
|
# return True |
|
|
|
|
|
|
|
|
|
|
|
return False |
|
|
|
# return False |
|
|
|
|
|
|
|
|
|
|
|
def group_stage_start_date(self): |
|
|
|
def group_stage_start_date(self): |
|
|
|
group_stages = [gs for gs in self.groupstage_set.all() if gs.start_date is not None] |
|
|
|
group_stages = [gs for gs in self.groupstage_set.all() if gs.start_date is not None] |
|
|
|
|