Fixed user.namespace_id exception if namespace is nil
This commit is contained in:
parent
c31d48dd25
commit
97a92f8ae7
2 changed files with 1 additions and 3 deletions
|
@ -47,9 +47,8 @@ class Admin::ProjectsController < AdminController
|
|||
|
||||
def project
|
||||
id = params[:project_id] || params[:id]
|
||||
id = id.split("/") if id.include?("/")
|
||||
|
||||
@project ||= Project.find_by_path(id)
|
||||
@project = Project.find_with_namespace(id)
|
||||
@project || render_404
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue