提交 b2df61d8 编写于 作者: D Dmitriy Zaporozhets

Fix 500 error on admin project if empty

上级 9902f1af
......@@ -137,6 +137,8 @@ module Repository
def has_commits?
!!commit
rescue Grit::NoSuchPathError
false
end
def root_ref
......
......@@ -5,7 +5,7 @@
%i.icon-edit
Edit
- if !@admin_project.has_post_receive_file? && @admin_project.commit
- if !@admin_project.has_post_receive_file? && @admin_project.has_commits?
%br
.alert.alert-error
%span
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册