Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
l y
Jumpserver
Commits
32ed3854
Commit
32ed3854
authored
4 years ago
by
ibuler
Committed by
老广
4 years ago
Browse files
Options
Download
Email Patches
Plain Diff
fix: 修复资产列表有时的bug
parent
b51eb426
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
apps/assets/utils.py
+4
-0
apps/assets/utils.py
with
4 additions
and
0 deletions
+4
-0
apps/assets/utils.py
+
4
-
0
View file @
32ed3854
...
...
@@ -125,6 +125,8 @@ class TreeService(Tree):
def
assets
(
self
,
nid
):
node
=
self
.
get_node
(
nid
)
if
not
node
:
return
set
()
return
node
.
data
.
get
(
"assets"
,
set
())
def
valid_assets
(
self
,
nid
):
...
...
@@ -132,6 +134,8 @@ class TreeService(Tree):
def
all_assets
(
self
,
nid
):
node
=
self
.
get_node
(
nid
)
if
not
node
:
return
set
()
if
node
.
data
is
None
:
node
.
data
=
{}
all_assets
=
node
.
data
.
get
(
"all_assets"
)
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
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