diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-04-01 16:56:25 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-04-01 16:56:25 +0300 |
commit | 541d89941014137762dff696c83b3357eba8efeb (patch) | |
tree | 8d94e6baced612248531b94ce747fe8b7d76e4e5 /lib/api | |
parent | 49b024f5f5b88d406b895f050943db1e75adfa2a (diff) | |
download | gitlab-ce-541d89941014137762dff696c83b3357eba8efeb.tar.gz |
Project.repository should never be nil so you can call repository.exists? or repository.empty?
Also specify separate project factory for project with filled repo
Diffstat (limited to 'lib/api')
-rw-r--r-- | lib/api/projects.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/api/projects.rb b/lib/api/projects.rb index d4f50fda1b5..ce94c34bd09 100644 --- a/lib/api/projects.rb +++ b/lib/api/projects.rb @@ -372,7 +372,7 @@ module Gitlab ref = params[:ref_name] || user_project.try(:default_branch) || 'master' commits = user_project.repository.commits(ref, nil, per_page, page * per_page) - present CommitDecorator.decorate(commits), with: Entities::RepoCommit + present commits, with: Entities::RepoCommit end # Get a project snippets |