From a5cef98b5d40a8177df87f23b8bb0948795df0dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gw=C3=A9na=C3=ABl=20Rault?= Date: Wed, 11 Sep 2024 09:04:13 +0200 Subject: [PATCH] Allow subsequent detailed_solutions --- api/v01/vrp.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/v01/vrp.rb b/api/v01/vrp.rb index 0f709af7..0f7fd58e 100644 --- a/api/v01/vrp.rb +++ b/api/v01/vrp.rb @@ -235,7 +235,7 @@ class Vrp < APIBase graph: result_object[:graph] }, geojsons: OutputHelper::Result.generate_geometry(result_object) - }, with: VrpResult, detailed_solutions: job&.status&.to_sym == :completed || result_object.dig(:configuration, :intermediate_solutions)) + }, with: VrpResult, detailed_solutions: job.nil? || job.status&.to_sym == :completed || result_object.dig(:configuration, :intermediate_solutions)) end # set nil to release memory because puma keeps the grape api endpoint object alive stored_result = nil # rubocop:disable Lint/UselessAssignment