fix empty params after whitelisting

pull/4748/head
manuschiller 8 years ago
parent 3897ac4d2d
commit 0bb457076b
  1. 2
      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']

Loading…
Cancel
Save