BigW Consortium Gitlab

Commit b2df61d8 by Dmitriy Zaporozhets

Fix 500 error on admin project if empty

parent 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% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment