diff --git a/agenda/types.py b/agenda/types.py index 2b759b6..b37f5ba 100644 --- a/agenda/types.py +++ b/agenda/types.py @@ -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