Skip to content
Snippets Groups Projects
Commit b2df61d8 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

Fix 500 error on admin project if empty

parent 9902f1af
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -137,6 +137,8 @@ module Repository
 
def has_commits?
!!commit
rescue Grit::NoSuchPathError
false
end
 
def root_ref
Loading
Loading
Loading
Loading
@@ -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
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment