Commit 8c454dba authored by Jan Provaznik's avatar Jan Provaznik

Re-enable has_parent optimization

Because we have foreign_key for parent_id now, we are sure
that parent_id can't be nil anymore so we can check parent_id
directly.
parent a91f7e32
......@@ -277,7 +277,7 @@ class Namespace < ApplicationRecord
end
def has_parent?
parent.present?
parent_id.present? || parent.present?
end
def root_ancestor
......
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