diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-20 17:22:11 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-20 17:22:11 +0300 |
commit | 0c872e02b2c822e3397515ec324051ff540f0cd5 (patch) | |
tree | ce2fb6ce7030e4dad0f4118d21ab6453e5938cdd /app/controllers/admin/projects_controller.rb | |
parent | f7e05a6853b12f02911494c4b3fe53d9540d74fc (diff) |
Add latest changes from gitlab-org/gitlab@15-7-stable-eev15.7.0-rc42
Diffstat (limited to 'app/controllers/admin/projects_controller.rb')
-rw-r--r-- | app/controllers/admin/projects_controller.rb | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/app/controllers/admin/projects_controller.rb b/app/controllers/admin/projects_controller.rb index 3f3c3581555..9e841487508 100644 --- a/app/controllers/admin/projects_controller.rb +++ b/app/controllers/admin/projects_controller.rb @@ -13,9 +13,7 @@ class Admin::ProjectsController < Admin::ApplicationController params[:sort] ||= 'latest_activity_desc' @sort = params[:sort] - if params[:last_repository_check_failed].present? && params[:archived].nil? - params[:archived] = true - end + params[:archived] = true if params[:last_repository_check_failed].present? && params[:archived].nil? @projects = Admin::ProjectsFinder.new(params: params, current_user: current_user).execute @@ -57,9 +55,7 @@ class Admin::ProjectsController < Admin::ApplicationController namespace = Namespace.find_by(id: params[:new_namespace_id]) ::Projects::TransferService.new(@project, current_user, params.dup).execute(namespace) - if @project.errors[:new_namespace].present? - flash[:alert] = @project.errors[:new_namespace].first - end + flash[:alert] = @project.errors[:new_namespace].first if @project.errors[:new_namespace].present? @project.reset redirect_to admin_project_path(@project) |