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
This commit is contained in:
parent
49b024f5f5
commit
541d899410
13 changed files with 51 additions and 54 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue