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
231f9619
Commit
231f9619
authored
Mar 23, 2016
by
wangyong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix asset upload bug
parent
300e1061
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
asset_api.py
jasset/asset_api.py
+2
-0
No files found.
jasset/asset_api.py
View file @
231f9619
...
@@ -290,6 +290,8 @@ def excel_to_db(excel_file):
...
@@ -290,6 +290,8 @@ def excel_to_db(excel_file):
ip
,
port
,
hostname
,
use_default_auth
,
username
,
password
,
group
=
row
ip
,
port
,
hostname
,
use_default_auth
,
username
,
password
,
group
=
row
if
get_object
(
Asset
,
hostname
=
hostname
):
if
get_object
(
Asset
,
hostname
=
hostname
):
continue
continue
if
isinstance
(
password
,
int
)
or
isinstance
(
password
,
float
):
password
=
unicode
(
int
(
password
))
use_default_auth
=
1
if
use_default_auth
==
u'默认'
else
0
use_default_auth
=
1
if
use_default_auth
==
u'默认'
else
0
password_encode
=
CRYPTOR
.
encrypt
(
password
)
if
password
else
''
password_encode
=
CRYPTOR
.
encrypt
(
password
)
if
password
else
''
if
hostname
:
if
hostname
:
...
...
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