Commit a9f2903e8642bc15da5a0b53f71b65ec1f25fc6e

Authored by Dmitriy Zaporozhets
1 parent 25f68a71

Change project lookup order for api

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Showing 1 changed file with 1 additions and 1 deletions   Show diff stats
lib/api/helpers.rb
... ... @@ -47,7 +47,7 @@ module API
47 47 end
48 48  
49 49 def find_project(id)
50   - project = Project.find_by(id: id) || Project.find_with_namespace(id)
  50 + project = Project.find_with_namespace(id) || Project.find_by(id: id)
51 51  
52 52 if project && can?(current_user, :read_project, project)
53 53 project
... ...