Skip to content

Commit

Permalink
undo here fix
Browse files Browse the repository at this point in the history
  • Loading branch information
arnasbr committed Sep 25, 2024
1 parent be9de0f commit da8c5a3
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions src/traveltime_google_comparison/requests/here_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,6 @@ async def send_request(
for section in first_route["sections"]
)

# For some reason, HERE provider returns 0 duration, 0 length
# for some routes in the mountains, but doesn't indicate anywhere
# that it failed. Returning 0 fails `asType(int)` conversion later.
# Example route in UK where this happens:
# "58.61966879999991, -5.0040819999999995","58.578906999999894, -4.880025099999999"
if total_duration == 0:
return RequestResult(None)

return RequestResult(travel_time=total_duration)
else:
error_message = data.get("detailedError", "")
Expand Down

0 comments on commit da8c5a3

Please sign in to comment.