Fix IsAncestor/IsDescendant for taxonomies

Fixes #7305
This commit is contained in:
Bjørn Erik Pedersen
2020-05-23 15:04:00 +02:00
parent a985efcecf
commit 4d7fa9f114
2 changed files with 52 additions and 8 deletions

View File

@@ -50,10 +50,6 @@ func (pt pageTree) IsAncestor(other interface{}) (bool, error) {
return ref1.n.p.IsHome(), nil
}
if !ref1.isSection() {
return false, nil
}
if ref1.key == ref2.key {
return true, nil
}
@@ -101,10 +97,6 @@ func (pt pageTree) IsDescendant(other interface{}) (bool, error) {
return ref2.n.p.IsHome(), nil
}
if !ref2.isSection() {
return false, nil
}
if ref1.key == ref2.key {
return true, nil
}