Show a geodesic line from LHR to the conference venue if no travel booked

Closes: #111
This commit is contained in:
Edward Betts 2024-01-16 12:26:27 +00:00
parent 322b65237d
commit 1e9ae2091e

View file

@ -191,8 +191,22 @@ def get_trip_routes(trip: Trip) -> list[StrDict]:
}
)
if routes:
return routes
lhr = (51.4775, -0.461389)
return [
{
"type": "flight",
"key": f'LHR_{item["location"]}_{item["country"]}',
"from": lhr,
"to": latlon_tuple(item),
}
for item in trip.conferences
if "latitude" in item and "longitude" in item and item["country"] != "gb"
]
def get_coordinates_and_routes(
trip_list: list[Trip],