Fix WP activity API error handling

pull/1619/head
Hagen Schink 10 years ago
parent 6aa58d2ed3
commit 9f0cbf3233
  1. 4
      lib/api/v3/work_packages/work_packages_api.rb

@ -32,7 +32,7 @@ module API
representer.to_json
else
errors = work_package.errors.full_messages.join(", ")
Errors::Validation.new(work_package, description: errors)
fail Errors::Validation.new(work_package, description: errors)
end
end
@ -44,7 +44,7 @@ module API
representer.to_json
else
errors = activity.errors.full_messages.join(", ")
Errors::Validation.new(activity, description: errors)
fail Errors::Validation.new(activity, description: errors)
end
end
end

Loading…
Cancel
Save