Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-01-27 06:11:24 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-01-27 06:11:24 +0300
commit729e66ee8e5790eefb3771040839155c499faab3 (patch)
tree19cd1fd73c2373c20d2888e857de022129a79eaa /lib/api/helpers.rb
parent431b84710e87a649de02d398568804f820e3b0fe (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/api/helpers.rb')
-rw-r--r--lib/api/helpers.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/api/helpers.rb b/lib/api/helpers.rb
index 2adcdb0598a..197bd420295 100644
--- a/lib/api/helpers.rb
+++ b/lib/api/helpers.rb
@@ -504,12 +504,12 @@ module API
def render_validation_error!(model, status = 400)
if model.errors.any?
- render_api_error!(model_error_messages(model) || '400 Bad Request', status)
+ render_api_error!(model_errors(model).messages || '400 Bad Request', status)
end
end
- def model_error_messages(model)
- model.errors.messages
+ def model_errors(model)
+ model.errors
end
def render_api_error_with_reason!(status, message, reason)