Include airport countries in trip country list
This commit is contained in:
parent
0079f46a80
commit
895bf7c972
|
@ -159,6 +159,19 @@ class Trip:
|
||||||
assert country
|
assert country
|
||||||
items.append(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
|
return items
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
|
Loading…
Reference in a new issue