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

refactor: clean up parameters

Christophe Bliard6cfcdc2421ba
diff --git a/app/services/bulk_services/project_mappings/base_create_service.rb b/app/services/bulk_services/project_mappings/base_create_service.rb
index 728dc476307..d1ef7e72176 100644
--- a/app/services/bulk_services/project_mappings/base_create_service.rb
+++ b/app/services/bulk_services/project_mappings/base_create_service.rb
@@ -98,14 +98,9 @@ module BulkServices
def set_attributes(params)
attributes_service_class
.new(user: @user,
- model: instance(params),
- contract_class: default_contract_class,
- contract_options: {})
- .call
- end
-
- def instance(params)
- mapping_model_class.new(params)
+ model: mapping_model_class.new,
+ contract_class: default_contract_class)
+ .call(params)
end
# @return [Symbol] the permission required to create the mapping