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

avoid error on empty workflow params

ulferts3436442479f1
diff --git a/app/controllers/workflows_controller.rb b/app/controllers/workflows_controller.rb
index 3ce4dc50d8f..39db0c61b1a 100644
--- a/app/controllers/workflows_controller.rb
+++ b/app/controllers/workflows_controller.rb
@@ -150,6 +150,8 @@ class WorkflowsController < ApplicationController
end
def permitted_status_params
+ return {} if params["status"].blank?
+
params["status"]
.to_unsafe_h
.select { |key, value| /\A\d+\z/.match?(key) && value.keys.all? { /\A\d+\z/.match?(it) } }