use convenient method to check for empty project repo
This commit is contained in:
parent
58a1ed6dd3
commit
7ed0dc0185
1 changed files with 3 additions and 3 deletions
|
@ -57,11 +57,11 @@ class ProjectsController < ProjectResourceController
|
||||||
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html do
|
format.html do
|
||||||
if @project.repository && !@project.repository.empty?
|
if @project.empty_repo?
|
||||||
|
render "projects/empty"
|
||||||
|
else
|
||||||
@last_push = current_user.recent_push(@project.id)
|
@last_push = current_user.recent_push(@project.id)
|
||||||
render :show
|
render :show
|
||||||
else
|
|
||||||
render "projects/empty"
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
format.js
|
format.js
|
||||||
|
|
Loading…
Reference in a new issue