Unverified Commit a9f2903e authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

Change project lookup order for api

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent 25f68a71
......@@ -47,7 +47,7 @@ def user_project
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)
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