diff options
Diffstat (limited to 'app/controllers/import/gitlab_groups_controller.rb')
-rw-r--r-- | app/controllers/import/gitlab_groups_controller.rb | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/app/controllers/import/gitlab_groups_controller.rb b/app/controllers/import/gitlab_groups_controller.rb index f68b76a7b36..503b10f766b 100644 --- a/app/controllers/import/gitlab_groups_controller.rb +++ b/app/controllers/import/gitlab_groups_controller.rb @@ -10,7 +10,7 @@ class Import::GitlabGroupsController < ApplicationController def create unless file_is_valid?(group_params[:file]) - return redirect_back_or_default(options: { alert: s_('GroupImport|Unable to process group import file') }) + return redirect_to new_group_path(anchor: 'import-group-pane'), alert: s_('GroupImport|Unable to process group import file') end group_data = group_params.except(:file).merge( @@ -30,9 +30,8 @@ class Import::GitlabGroupsController < ApplicationController redirect_to group_path(group), alert: _("Group import could not be scheduled") end else - redirect_back_or_default( - options: { alert: s_("GroupImport|Group could not be imported: %{errors}") % { errors: group.errors.full_messages.to_sentence } } - ) + redirect_to new_group_path(anchor: 'import-group-pane'), + alert: s_("GroupImport|Group could not be imported: %{errors}") % { errors: group.errors.full_messages.to_sentence } end end |