Add more country flags on the trip list.

This commit is contained in:
Edward Betts 2024-05-18 20:29:29 +02:00
parent 448d59514b
commit d4dda44768
2 changed files with 8 additions and 9 deletions

View file

@ -59,7 +59,9 @@ class TripElement:
def airport_label(airport: StrDict) -> str:
"""Airport label: name and iata."""
name = airport.get("alt_name") or airport["city"]
return f"{name} ({airport['iata']})"
country = agenda.get_country(airport["country"])
assert country and country.flag
return f"{name} ({airport['iata']}) {country.flag}"
@dataclass