Update node.py (#2527)

bugfix: node get_all_children逻辑
pull/2608/head
zhnxin 2019-04-15 14:43:49 +08:00 committed by 老广
parent ba9581801c
commit 35a0ca1875
1 changed files with 1 additions and 1 deletions

View File

@ -148,7 +148,7 @@ class Node(OrgModelMixin):
)
def get_all_children(self, with_self=False):
pattern = r'^{0}$|^{0}:' if with_self else r'^{0}'
pattern = r'^{0}$|^{0}:' if with_self else r'^{0}:'
return self.__class__.objects.filter(
key__regex=pattern.format(self.key)
)