Add more country flags on the trip list.
This commit is contained in:
parent
448d59514b
commit
d4dda44768
2 changed files with 8 additions and 9 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue