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

Fix 500 error on empty search in project

parent 4b65b0e0
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -45,7 +45,7 @@ module Gitlab
private
 
def blobs
if project.empty_repo?
if project.empty_repo? || query.blank?
[]
else
project.repository.search_files(query, repository_ref)
Loading
Loading
@@ -53,7 +53,7 @@ module Gitlab
end
 
def wiki_blobs
if project.wiki_enabled?
if project.wiki_enabled? && query.present?
project_wiki = ProjectWiki.new(project)
 
unless project_wiki.empty?
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