diff --git a/tournaments/models/match.py b/tournaments/models/match.py index 157c140..814b3cf 100644 --- a/tournaments/models/match.py +++ b/tournaments/models/match.py @@ -105,7 +105,6 @@ class Match(models.Model): def magic_duration(self): seconds = (self.end_date - self.start_date).total_seconds() average_duration = self.average_seconds_duration() - # print(f"{average_duration} / {seconds}") if (average_duration / 2) > seconds or seconds > (average_duration * 2): seconds = average_duration @@ -126,12 +125,7 @@ class Match(models.Model): if self.end_date: return (self.end_date - self.start_date).total_seconds() else: - current = (timezone.now() - self.start_date).total_seconds() - if current < self.average_seconds_duration() * 2: - return current - else: - return None - # return (timezone.now() - self.start_date).total_seconds() + return (timezone.now() - self.start_date).total_seconds() else: return 0 diff --git a/tournaments/templates/tournaments/match_cell.html b/tournaments/templates/tournaments/match_cell.html index 9f13c75..218bc3e 100644 --- a/tournaments/templates/tournaments/match_cell.html +++ b/tournaments/templates/tournaments/match_cell.html @@ -23,17 +23,19 @@ {% if match.started %}
+ {% if team.scores %} {% for score in team.scores %} {{ score }} {% endfor %} - + {% else %} + {{ team.weight }} + {% endif %} {% if match.has_walk_out %} {% if team.walk_out %}WO{% endif %} {% endif %}
- {% elif not tournament.hide_weight %} {{ team.weight }} {% endif %}