diff options
Diffstat (limited to 'app/models/namespace.rb')
-rw-r--r-- | app/models/namespace.rb | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/app/models/namespace.rb b/app/models/namespace.rb index 985395a6fe2..5ceb3d0aee6 100644 --- a/app/models/namespace.rb +++ b/app/models/namespace.rb @@ -178,7 +178,7 @@ class Namespace < ActiveRecord::Base # Returns all the ancestors of the current namespaces. def ancestors - return self.class.none if !Group.supports_nested_groups? || !parent_id + return self.class.none unless parent_id Gitlab::GroupHierarchy. new(self.class.where(id: parent_id)). @@ -187,8 +187,6 @@ class Namespace < ActiveRecord::Base # Returns all the descendants of the current namespace. def descendants - return self.class.none unless Group.supports_nested_groups? - Gitlab::GroupHierarchy. new(self.class.where(parent_id: id)). base_and_descendants |