When an admin user fills out the form to create a new admin set and tries to save, the following error occurs:
ArgumentError in Sufia::Admin::AdminSetsController#createwrong number of arguments (given 2, expected 3)
The problem is the initializer in AdminSetCreateService is defined with def initialize(admin_set, creating_user, workflow_name) while the create_admin_set method in AdminSetsController is passing AdminSetCreateService.new(@admin_set, current_user).create with no workflow name.
Descriptive summary
When an admin user fills out the form to create a new admin set and tries to save, the following error occurs:
ArgumentError in Sufia::Admin::AdminSetsController#create
wrong number of arguments (given 2, expected 3)
The problem is the initializer in AdminSetCreateService is defined with
def initialize(admin_set, creating_user, workflow_name)
while the create_admin_set method in AdminSetsController is passingAdminSetCreateService.new(@admin_set, current_user).create
with no workflow name.See https://github.com/projecthydra/sufia/blob/v7.3.0/app/controllers/sufia/admin/admin_sets_controller.rb#L98 and https://github.com/projecthydra/sufia/blob/v7.3.0/app/services/sufia/admin_set_create_service.rb#L19
Passing the contents of
params[:admin_set][:workflow_name]
as a third param does fix it.Steps to reproduce the behavior
Looks like the bug was introduced in https://github.com/projecthydra/sufia/commit/d49df2fd4577c674928069696d758b68b393d72a