Merge branch 'dev-homepage-revision' into 'develop'
修复版本库不存在时,管理员删除项目出错的bug 修复版本库不存在时,管理员删除项目出错的bug See merge request !186
This commit is contained in:
commit
f3aa5c1718
|
@ -1124,7 +1124,7 @@ class ProjectsController < ApplicationController
|
|||
g.delete_project(@project.gpid)
|
||||
# 删除Trustie版本库记录
|
||||
repoisitory = Repository.where(:project_id => @project.id, :type => GITLABTYPE).first
|
||||
repoisitory.delete
|
||||
repoisitory.delete unless repository.blank?
|
||||
@project.update_column(:gpid, nil)
|
||||
@project.update_column(:forked_from_project_id, nil)
|
||||
@project_to_destroy = @project
|
||||
|
@ -1332,4 +1332,3 @@ class ProjectsController < ApplicationController
|
|||
true
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue