From 8c735663bd0c83c7e9634a672239bcf7b253f0e7 Mon Sep 17 00:00:00 2001 From: quentinchampenois <26109239+Quentinchampenois@users.noreply.github.com> Date: Mon, 10 Jun 2024 13:48:26 +0200 Subject: [PATCH] fix: Use current_order when reviewing vote --- .../decidim/budgets_booth/orders_controller_extensions.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/decidim-budgets_booth/app/controllers/concerns/decidim/budgets_booth/orders_controller_extensions.rb b/decidim-budgets_booth/app/controllers/concerns/decidim/budgets_booth/orders_controller_extensions.rb index 25ada1b1..e382c59b 100644 --- a/decidim-budgets_booth/app/controllers/concerns/decidim/budgets_booth/orders_controller_extensions.rb +++ b/decidim-budgets_booth/app/controllers/concerns/decidim/budgets_booth/orders_controller_extensions.rb @@ -52,10 +52,9 @@ def reset_workflow end def order - result = Decidim::Budgets::Order.find_by(decidim_budgets_budget_id: params[:budget_id]) - return nil unless result && result.checked_out_at.present? + return unless current_order.present? && current_order.checked_out_at.present? - result + current_order end end end