Commit 424b42d6 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Fix 500 error on empty search in project

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent 4b65b0e0
......@@ -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)
......@@ -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?
......
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