Show a geodesic line from LHR to the conference venue if no travel booked
Closes: #111
This commit is contained in:
parent
322b65237d
commit
1e9ae2091e
|
@ -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],
|
||||
|
|
Loading…
Reference in a new issue