diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-03-14 15:58:52 +0200 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-03-14 15:58:52 +0200 |
commit | a9f2903e8642bc15da5a0b53f71b65ec1f25fc6e (patch) | |
tree | 35f1681e1d062db9f22b3e3f7083f0f2bdb4e2a8 /lib/api/helpers.rb | |
parent | 25f68a71d6a176c35e3817cf98d4668a7a303f74 (diff) | |
download | gitlab-ce-a9f2903e8642bc15da5a0b53f71b65ec1f25fc6e.tar.gz |
Change project lookup order for api
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'lib/api/helpers.rb')
-rw-r--r-- | lib/api/helpers.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/api/helpers.rb b/lib/api/helpers.rb index f8c48e2f3b2..fc309f65a56 100644 --- a/lib/api/helpers.rb +++ b/lib/api/helpers.rb @@ -47,7 +47,7 @@ module API end 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) project |