Commit 35a0ca18 authored by zhnxin's avatar zhnxin Committed by 老广

Update node.py (#2527)

bugfix: node get_all_children逻辑
parent ba958180
...@@ -148,7 +148,7 @@ class Node(OrgModelMixin): ...@@ -148,7 +148,7 @@ class Node(OrgModelMixin):
) )
def get_all_children(self, with_self=False): 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( return self.__class__.objects.filter(
key__regex=pattern.format(self.key) key__regex=pattern.format(self.key)
) )
......
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