Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Use the correct Rails finder when looking for reassign_to_id

Oliver Günther8fe862342634
diff --git a/modules/budgets/app/controllers/budgets_controller.rb b/modules/budgets/app/controllers/budgets_controller.rb
index 14a5325e2a7..2d47f2c1c85 100644
--- a/modules/budgets/app/controllers/budgets_controller.rb
+++ b/modules/budgets/app/controllers/budgets_controller.rb
@@ -279,7 +279,7 @@ class BudgetsController < ApplicationController
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