diff --git a/agenda/schengen.py b/agenda/schengen.py index 8e8fc3a..53debf8 100644 --- a/agenda/schengen.py +++ b/agenda/schengen.py @@ -157,14 +157,12 @@ def extract_schengen_stays_from_travel( # Currently outside Schengen if to_country and is_schengen_country(to_country): # Entering Schengen - use arrival date for long-haul flights - entry_travel_date = travel_date - if item.get("arrive"): - arrive_date = item.get("arrive") - if isinstance(arrive_date, datetime): - arrive_date = arrive_date.date() - elif isinstance(arrive_date, date): - entry_travel_date = arrive_date - entry_date = entry_travel_date + arrive_date = item.get("arrive") + assert arrive_date + if isinstance(arrive_date, datetime): + arrive_date = arrive_date.date() + assert isinstance(arrive_date, date) + entry_date = arrive_date current_location = to_country