未验证 提交 177055ac 编写于 作者: J Jiangjie.Bai 提交者: GitHub

Merge pull request #5032 from jumpserver/dev

fix(assets): 修复获取org_root的问题
......@@ -352,7 +352,9 @@ class SomeNodesMixin:
@classmethod
def org_root(cls):
root = cls.objects.filter(parent_key='').exclude(key__startswith='-')
root = cls.objects.filter(parent_key='')\
.filter(key__regex=r'^[0-9]+$')\
.exclude(key__startswith='-')
if root:
return root[0]
else:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册