Include airport countries in trip country list

This commit is contained in:
Edward Betts 2024-06-17 16:29:19 +01:00
parent 0079f46a80
commit 895bf7c972

View file

@ -159,6 +159,19 @@ class Trip:
assert country
items.append(country)
for item in self.travel:
if item["type"] != "flight":
continue
for key in "from_airport", "to_airport":
c = item[key]["country"]
if c in seen:
continue
seen.add(c)
country = agenda.get_country(c)
assert country
items.append(country)
return items
@property