Skip to content

Commit

Permalink
Fixed bug in merging routes method
Browse files Browse the repository at this point in the history
  • Loading branch information
r4m-juan committed Apr 13, 2023
1 parent 2e396aa commit f0555ef
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
11 changes: 2 additions & 9 deletions examples/routes/merge_routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,9 @@ def main(api_key):
if isinstance(response, dict) and 'errors' in response.keys():
print('. '.join(response['errors']))
else:
print('Optimization Problem ID: {}'.format(
response['optimization_problem_id']
print('Optimization Problem ID: {} - Status: {}'.format(
response['optimization_problem_id'], response['status']
))
print('Route ID: {}'.format(response['route_id']))
for i, address in enumerate(response['addresses']):
print('Address #{}'.format(i + 1))
print('\tAddress: {0}'.format(address['address']))
print('\tRoute Destination ID: {0}'.format(
address['route_destination_id']
))


if __name__ == '__main__':
Expand Down
2 changes: 1 addition & 1 deletion route4me/route.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ def merge_routes(self, **kwargs):
if self.check_required_params(kwargs, ['route_ids']):
response = self.api._request_post(MERGE_ROUTES_HOST,
self.params,
json=kwargs)
data=kwargs)
return response.json()

else:
Expand Down

0 comments on commit f0555ef

Please sign in to comment.