diff --git a/agenda/types.py b/agenda/types.py index c7bcb45..0bfef4d 100644 --- a/agenda/types.py +++ b/agenda/types.py @@ -171,7 +171,7 @@ class Trip: @functools.cached_property def show_flags(self) -> bool: """Show flags for international trips.""" - return len(self.countries) != 1 or self.countries[0].name != "United Kingdom" + return len({c for c in self.countries if c.name != "United Kingdom"}) > 1 @property def countries_str(self) -> str: diff --git a/templates/macros.html b/templates/macros.html index f9ca49f..20cf147 100644 --- a/templates/macros.html +++ b/templates/macros.html @@ -284,7 +284,7 @@ | Venue: {{ item.venue }} | Location: {{ item.location }} {% if country %} - {{ country.flag }} + {{ flag(trip, country.flag) }} {% elif item.online %} 💻 Online {% else %}