* [Update] 修改心跳偶人时间

* [Update] 修改Node比较

* [Bugfix] 修复bug
pull/2253/head
老广 2018-12-21 15:47:52 +08:00 committed by GitHub
parent ac9178cb93
commit e7725e6910
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View File

@ -45,10 +45,10 @@ class Setting(models.Model):
def cleaned_value(self):
try:
value = self.value
if not isinstance(value, (str, bytes)):
return value
if self.encrypted:
value = signer.unsign(value)
if not value:
return None
value = json.loads(value)
return value
except json.JSONDecodeError:

View File

@ -49,7 +49,9 @@ class TreeNode:
return False
elif not self.isParent and other.isParent:
return True
return self.id > other.id
if self.pId != other.pId:
return self.pId > other.pId
return self.name > other.name
def __eq__(self, other):
return self.id == other.id