Merge pull request #3356 from jumpserver/dev_tree

[Bugfix] 修复 TreeNode bug
pull/3359/head
BaiJiangJie 2019-10-18 15:25:43 +08:00 committed by GitHub
commit 491f59026c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -51,7 +51,7 @@ class TreeNode:
result = True
elif self.pId != other.pId:
result = self.pId > other.pId
elif self.id.startswith('-') and not other.id.startswith('-'):
elif str(self.id).startswith('-') and not str(other.id).startswith('-'):
result = False
else:
result = self.name > other.name