diff --git a/app/controllers/collections/workflows_controller.rb b/app/controllers/collections/workflows_controller.rb index fd503473c..b51114585 100644 --- a/app/controllers/collections/workflows_controller.rb +++ b/app/controllers/collections/workflows_controller.rb @@ -10,6 +10,7 @@ class Collections::WorkflowsController < ApplicationController private def set_workflow - @workflow = Workflow.find(params[:collection][:workflow_id]) + workflow_id = params[:collection][:workflow_id] + @workflow = workflow_id.present? ? Workflow.find(workflow_id) : nil end end diff --git a/app/views/collections/edit/_workflows.html.erb b/app/views/collections/edit/_workflows.html.erb index 73d36de66..28c8f521d 100644 --- a/app/views/collections/edit/_workflows.html.erb +++ b/app/views/collections/edit/_workflows.html.erb @@ -4,8 +4,8 @@