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