Commit a9f2903e authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Change project lookup order for api

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent 25f68a71
...@@ -47,7 +47,7 @@ module API ...@@ -47,7 +47,7 @@ module API
end end
def find_project(id) def find_project(id)
project = Project.find_by(id: id) || Project.find_with_namespace(id) project = Project.find_with_namespace(id) || Project.find_by(id: id)
if project && can?(current_user, :read_project, project) if project && can?(current_user, :read_project, project)
project project
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment