diff --git a/CHANGELOG.md b/CHANGELOG.md index bd9ae3f55..041531571 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,8 @@ ### Fixed +- In some cases, the jobs were impossible to remove [#432](https://github.com/Mapotempo/optimizer-api/pull/432) + ## [v1.9.0] - 2022-06-07 ### Added diff --git a/api/v01/vrp.rb b/api/v01/vrp.rb index e38e6a8fb..6772cca39 100644 --- a/api/v01/vrp.rb +++ b/api/v01/vrp.rb @@ -306,8 +306,8 @@ class Vrp < APIBase }, with: VrpResult) end result_object = nil # rubocop:disable Lint/UselessAssignment - OptimizerWrapper.job_remove(params[:api_key], id) end + OptimizerWrapper.job_remove(params[:api_key], id) if job&.dig('options', 'api_key') == params[:api_key] end end end