Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
J
jumpserver
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ops
jumpserver
Commits
e7725e69
Unverified
Commit
e7725e69
authored
6 years ago
by
老广
Committed by
GitHub
6 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bugfix (#2252)
* [Update] 修改心跳偶人时间 * [Update] 修改Node比较 * [Bugfix] 修复bug
parent
ac9178cb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
models.py
apps/common/models.py
+2
-2
tree.py
apps/common/tree.py
+3
-1
No files found.
apps/common/models.py
View file @
e7725e69
...
...
@@ -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
:
...
...
This diff is collapsed.
Click to expand it.
apps/common/tree.py
View file @
e7725e69
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment