diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-18 11:18:50 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-18 11:18:50 +0000 |
commit | 8c7f4e9d5f36cff46365a7f8c4b9c21578c1e781 (patch) | |
tree | a77e7fe7a93de11213032ed4ab1f33a3db51b738 /app/models/namespace.rb | |
parent | 00b35af3db1abfe813a778f643dad221aad51fca (diff) | |
download | gitlab-ce-8c7f4e9d5f36cff46365a7f8c4b9c21578c1e781.tar.gz |
Add latest changes from gitlab-org/gitlab@13-1-stable-ee
Diffstat (limited to 'app/models/namespace.rb')
-rw-r--r-- | app/models/namespace.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/app/models/namespace.rb b/app/models/namespace.rb index 8116f7a256f..90b4be7a674 100644 --- a/app/models/namespace.rb +++ b/app/models/namespace.rb @@ -100,11 +100,11 @@ class Namespace < ApplicationRecord # Searches for namespaces matching the given query. # - # This method uses ILIKE on PostgreSQL and LIKE on MySQL. + # This method uses ILIKE on PostgreSQL. # - # query - The search query as a String + # query - The search query as a String. # - # Returns an ActiveRecord::Relation + # Returns an ActiveRecord::Relation. def search(query) fuzzy_search(query, [:name, :path]) end @@ -277,7 +277,7 @@ class Namespace < ApplicationRecord end def has_parent? - parent.present? + parent_id.present? || parent.present? end def root_ancestor |