From 210434e4adc12e016a4875ae4ffbb66567aa7bf9 Mon Sep 17 00:00:00 2001 From: Tony Stork Date: Tue, 9 Dec 2025 20:15:39 -0500 Subject: [PATCH] Prevent trying to report team record when it is not provided --- custom_templates/sports.jinja | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_templates/sports.jinja b/custom_templates/sports.jinja index 3464d87..baa5f52 100644 --- a/custom_templates/sports.jinja +++ b/custom_templates/sports.jinja @@ -90,8 +90,8 @@ {% elif state_attr(team,'opponent_winner') == true %} The {{ state_attr(team,'friendly_name') }} lost their game today against {% if state_attr(team,'league') != 'NCAAF'%}the{% endif %} {{ opponent_name }} by a score of {{ state_attr(team,'opponent_score') }} to {{ state_attr(team,'team_score') }}. {% endif %} - {% if state_attr(team,'clock') not in ['postponed','Postponed'] %} - This brings their record to {{ state_attr(team,'team_record') | replace("-"," and ") }} on the season. + {% if state_attr(team,'clock') not in ['postponed','Postponed'] and state_attr(team,'team_record') != None %} + This brings their record to {{ state_attr(team,'team_record') | replace("-"," and ") }} on the season. {% endif %} {% elif yday == date %} {% if state_attr(team,'clock') in ['postponed','Postponed'] %}