diff --git a/lib/api/v3/relations/relations_api.rb b/lib/api/v3/relations/relations_api.rb index 47d2424757..1b14f6cee2 100644 --- a/lib/api/v3/relations/relations_api.rb +++ b/lib/api/v3/relations/relations_api.rb @@ -51,7 +51,7 @@ module API end post do authorize(:manage_work_package_relations, context: @work_package.project) - declared_params = declared(params).reject { |key, value| key.to_sym == :id || value.nil? } + declared_params = declared(params).with_indifferent_access.reject { |key, value| key == :id || value.nil? } relation = @work_package.new_relation.tap do |r| r.to = WorkPackage.visible.find_by id: declared_params['to_id']