Merge pull request #2683 from jumpserver/dev

[Update] 修改排序节点排序规则
pull/2684/head
老广 2019-05-10 11:35:46 +08:00 committed by GitHub
commit 74ae7d138e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 4 deletions

View File

@ -49,10 +49,7 @@ class Node(OrgModelMixin):
if self_parent_key == other_parent_key:
return self.name > other.name
if self_key != other_key:
return self_key > other_key
else:
return self.name > other.name
return self_key > other_key
def __lt__(self, other):
return not self.__gt__(other)