From 943a7e0afce5a2283890277fd01e8a86a7c556c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20G=C3=BCnther?= Date: Tue, 14 Dec 2021 08:57:58 +0100 Subject: [PATCH] Use the correct Rails finder when looking for reassign_to_id --- modules/budgets/app/controllers/budgets_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/budgets/app/controllers/budgets_controller.rb b/modules/budgets/app/controllers/budgets_controller.rb index 14a5325e2a76..2d47f2c1c851 100644 --- a/modules/budgets/app/controllers/budgets_controller.rb +++ b/modules/budgets/app/controllers/budgets_controller.rb @@ -279,7 +279,7 @@ def update_belonging_work_packages reassign_to_id = params[:reassign_to_id] budget_id = params[:id] - budget_exists = Budget.visible(current_user).exists?(reassign_to_id) if params[:todo] == 'reassign' + budget_exists = Budget.visible(current_user).exists?(id: reassign_to_id) if params[:todo] == 'reassign' reassign_to = budget_exists ? reassign_to_id : nil WorkPackage