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
a14d6b29
Unverified
Commit
a14d6b29
authored
Dec 21, 2018
by
老广
Committed by
GitHub
Dec 21, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2253 from jumpserver/dev
Bugfix (#2252)
parents
23bf2b0f
e7725e69
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 @
a14d6b29
...
@@ -45,10 +45,10 @@ class Setting(models.Model):
...
@@ -45,10 +45,10 @@ class Setting(models.Model):
def
cleaned_value
(
self
):
def
cleaned_value
(
self
):
try
:
try
:
value
=
self
.
value
value
=
self
.
value
if
not
isinstance
(
value
,
(
str
,
bytes
)):
return
value
if
self
.
encrypted
:
if
self
.
encrypted
:
value
=
signer
.
unsign
(
value
)
value
=
signer
.
unsign
(
value
)
if
not
value
:
return
None
value
=
json
.
loads
(
value
)
value
=
json
.
loads
(
value
)
return
value
return
value
except
json
.
JSONDecodeError
:
except
json
.
JSONDecodeError
:
...
...
apps/common/tree.py
View file @
a14d6b29
...
@@ -49,7 +49,9 @@ class TreeNode:
...
@@ -49,7 +49,9 @@ class TreeNode:
return
False
return
False
elif
not
self
.
isParent
and
other
.
isParent
:
elif
not
self
.
isParent
and
other
.
isParent
:
return
True
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
):
def
__eq__
(
self
,
other
):
return
self
.
id
==
other
.
id
return
self
.
id
==
other
.
id
...
...
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