From 2edfb40e666293642a11728cc596fd5d95e3d3ee Mon Sep 17 00:00:00 2001 From: Edward Betts Date: Wed, 18 Feb 2026 17:09:18 +0000 Subject: [PATCH] Avoid crash when flight.co2_kg is not set. --- templates/macros.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/macros.html b/templates/macros.html index 0ad625d..d51ae9b 100644 --- a/templates/macros.html +++ b/templates/macros.html @@ -497,7 +497,7 @@ https://www.flightradar24.com/data/flights/{{ flight.airline_detail.iata | lower duration: {{ flight.duration }} {% endif %} {#
{{ flight | pprint }}
#} - {% if flight.co2_kg is not none %} + {% if flight.co2_kg is defined and flight.co2_kg is not none %} CO₂: {{ "{:,.1f}".format(flight.co2_kg) }} kg {% endif %} {% endif %}