Skip to content

Commit

Permalink
Merge pull request #4294 from hove-io/NAV-3258_fix_500_on_idfm
Browse files Browse the repository at this point in the history
fix error 500 when direct_path=only  and error in pt_fares
  • Loading branch information
xlqian authored Jul 31, 2024
2 parents 04e6c93 + c85acff commit 431e96a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ def async_compute_fare(self, response, request_id):
self._futures.append(self._future_manager.create_future(self._do, response, request_id).get_future())

def _do(self, response, request_id):
return response, self._backend.get_pt_journeys_fares(response.journeys, request_id)
if response and response.journeys:
return response, self._backend.get_pt_journeys_fares(response.journeys, request_id)
return response, None

def wait_and_generate(self):
with gevent.iwait(self._futures) as futures:
Expand Down
2 changes: 2 additions & 0 deletions source/jormungandr/jormungandr/scenarios/journey_filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -754,6 +754,8 @@ def filter_olympic_site_by_min_pt_duration(
origin_olympic_site = False

for resp in response_list:
if not resp:
continue
for j in resp.journeys:
if not j.sections:
continue
Expand Down

0 comments on commit 431e96a

Please sign in to comment.