mirror of https://github.com/jumpserver/jumpserver
fix asset upload bug
parent
300e106143
commit
231f961945
|
@ -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:
|
||||||
|
|
Loading…
Reference in New Issue