summaryrefslogtreecommitdiff
path: root/app/models/namespace.rb
diff options
context:
space:
mode:
authorWei-Meng Lee <wlee@gitlab.com>2019-04-26 23:17:06 +0800
committerWei-Meng Lee <wlee@gitlab.com>2019-05-31 20:49:27 +0800
commit03e08ab775312b92440caadc06a88b6f6805bc18 (patch)
tree668f476b3207c62488267f72e0205b7b97fca67d /app/models/namespace.rb
parent31775ad83aa35fa29e66d3322e6bdf921f4e1792 (diff)
downloadgitlab-ce-03e08ab775312b92440caadc06a88b6f6805bc18.tar.gz
Guarantee order of notification settings
Diffstat (limited to 'app/models/namespace.rb')
-rw-r--r--app/models/namespace.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/namespace.rb b/app/models/namespace.rb
index f7c31890198..3c270c7396a 100644
--- a/app/models/namespace.rb
+++ b/app/models/namespace.rb
@@ -206,12 +206,12 @@ class Namespace < ApplicationRecord
.ancestors(upto: top, hierarchy_order: hierarchy_order)
end
- def self_and_ancestors
+ def self_and_ancestors(hierarchy_order: nil)
return self.class.where(id: id) unless parent_id
Gitlab::ObjectHierarchy
.new(self.class.where(id: id))
- .base_and_ancestors
+ .base_and_ancestors(hierarchy_order: hierarchy_order)
end
# Returns all the descendants of the current namespace.