diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/api/helpers.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/api/helpers.rb b/lib/api/helpers.rb index e7b9a417b08..4dfe35f49ef 100644 --- a/lib/api/helpers.rb +++ b/lib/api/helpers.rb @@ -5,7 +5,8 @@ module Gitlab end def user_project - @project ||= current_user.projects.find_by_code(params[:id]) + @project ||= current_user.projects.find_by_id(params[:id]) || + current_user.projects.find_by_code(params[:id]) end def authenticate! |