Fix Schengen calculation bug
🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
338d6ea067
commit
791759b322
|
|
@ -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")
|
||||
assert arrive_date
|
||||
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
|
||||
assert isinstance(arrive_date, date)
|
||||
entry_date = arrive_date
|
||||
|
||||
current_location = to_country
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue