Merge branch 'dev-homepage-revision' into 'develop'

修复管理员不能删除项目的bug

修复管理员不能删除项目的bug

See merge request !187
This commit is contained in:
陈晓婷 2019-10-11 13:58:56 +08:00
commit aa4706c13b
1 changed files with 1 additions and 1 deletions

View File

@ -1121,7 +1121,7 @@ class ProjectsController < ApplicationController
def destroy
ActiveRecord::Base.transaction do
g = Gitlab.client
g.delete_project(@project.gpid)
g.delete_project(@project.gpid) unless @project.gpid.blank?
# 删除Trustie版本库记录
repoisitory = Repository.where(:project_id => @project.id, :type => GITLABTYPE).first
repoisitory.delete unless repository.blank?