From a391d51d67dfe04256a8a2e09008952c7a13eb7a Mon Sep 17 00:00:00 2001 From: nicofrand Date: Sat, 20 Jan 2018 18:03:44 +0100 Subject: [PATCH] fix issue with travel time --- flatisfy/filters/metadata.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/flatisfy/filters/metadata.py b/flatisfy/filters/metadata.py index 2f79199..2a6eccb 100644 --- a/flatisfy/filters/metadata.py +++ b/flatisfy/filters/metadata.py @@ -424,9 +424,14 @@ def compute_travel_times(flats_list, constraint, config): place["gps"], config ) - if time_from_station and (time_from_station < time_to_place or - time_to_place is None): - time_to_place = time_from_station + if ( + time_from_station and + ( + time_from_station["time"] < time_to_place or + time_to_place is None + ) + ): + time_to_place = time_from_station["time"] if time_to_place: LOGGER.info(