Commit 77c10461 authored by Erick Bajao's avatar Erick Bajao

Set heirarchy order explicitly to asc

parent 784612e2
......@@ -2261,8 +2261,8 @@ class Project < ApplicationRecord
def closest_namespace_setting(name)
namespace
.self_and_ancestors
.detect { |n| !n.read_attribute(name).nil? }
.self_and_ancestors(hierarchy_order: :asc)
.find { |n| !n.read_attribute(name).nil? }
.try(name)
end
......
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