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 %}