GitLab steht wegen Wartungsarbeiten am Montag, den 10. Mai, zwischen 17:00 und 19:00 Uhr nicht zur Verfügung.

Commit b2df61d8 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Fix 500 error on admin project if empty

parent 9902f1af
......@@ -137,6 +137,8 @@ def discover_default_branch
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