diff options
author | Stan Hu <stanhu@gmail.com> | 2018-06-06 11:56:50 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2018-06-06 12:00:49 +0300 |
commit | 332275b766283ff65d0637ada3e4080c3cd4f038 (patch) | |
tree | 25ddd96287f3ea8eb26db54ea1d047acfa2a75ca /app/controllers | |
parent | 3a722ff53fe86ce6194f81ade810196f4f8e870c (diff) |
Simplify error message handling in Projects::CreateService
There's no need to add a redundant message to the errors if the
model is invalid. This cleans up the message as well for the importer.
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/import/base_controller.rb | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/app/controllers/import/base_controller.rb b/app/controllers/import/base_controller.rb index 0f401f77fcd..5766c6924cd 100644 --- a/app/controllers/import/base_controller.rb +++ b/app/controllers/import/base_controller.rb @@ -27,11 +27,6 @@ class Import::BaseController < ApplicationController end def project_save_error(project) - # Projects::CreateService will set base message if unable to save - if project.errors[:base].present? - project.errors[:base].last - else - project.errors.full_messages.join(', ') - end + project.errors.full_messages.join(', ') end end |