mirror of https://github.com/jumpserver/jumpserver
parent
ac9178cb93
commit
e7725e6910
|
@ -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:
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue