Skip to content

Commit

Permalink
return more of the standard structure when theres no data
Browse files Browse the repository at this point in the history
  • Loading branch information
Nate-Wessel committed Jul 11, 2024
1 parent be26ebe commit 23f8c98
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion backend/app/get_travel_time.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,13 @@ def get_travel_time(start_node, end_node, start_time, end_time, start_date, end_
if len(sample) < 1:
# no travel times or related info to return here
return {
'results': {'travel_time': None},
'results': {
'travel_time': None,
'observations': [],
'confidence': {
'sample': len(sample) # 0
},
},
'query': {
'corridor': {'links': links},
'query_params': query_params
Expand Down

0 comments on commit 23f8c98

Please sign in to comment.