diff --git a/ogn_python/routes.py b/ogn_python/routes.py index 28f46f7..54dd5d1 100644 --- a/ogn_python/routes.py +++ b/ogn_python/routes.py @@ -127,9 +127,7 @@ def airports(): countries = get_countries_in_logbook() if sel_country: - airports = db.session.query(Airport) \ - .filter(Airport.country_code == sel_country) \ - .order_by(Airport.name) + airports = get_airports_in_country(sel_country) else: airports = [] diff --git a/ogn_python/templates/airports.html b/ogn_python/templates/airports.html index 34ac124..a2c1b34 100644 --- a/ogn_python/templates/airports.html +++ b/ogn_python/templates/airports.html @@ -30,8 +30,8 @@ {% for airport in airports %}