🔧 Fix: Correct date handling in Trip class
🗓️ Utilize utils.as_date for date conversions in travel checks. Closes: #181
This commit is contained in:
parent
a1cdf62eef
commit
9ad2ba9462
|
@ -75,11 +75,11 @@ class Trip:
|
|||
]
|
||||
if not titles:
|
||||
for travel in self.travel:
|
||||
if travel["depart"] and travel["depart"].date() != self.start:
|
||||
if travel["depart"] and utils.as_date(travel["depart"]) != self.start:
|
||||
place = travel["from"]
|
||||
if place not in titles:
|
||||
titles.append(place)
|
||||
if travel["depart"] and travel["depart"].date() != self.end:
|
||||
if travel["depart"] and utils.as_date(travel["depart"]) != self.end:
|
||||
place = travel["to"]
|
||||
if place not in titles:
|
||||
titles.append(place)
|
||||
|
|
Loading…
Reference in a new issue