mirror of https://github.com/jumpserver/jumpserver
fix line break bug on add multiple hosts
parent
b8dfb26a3a
commit
f5e57da106
|
@ -232,7 +232,7 @@ def host_add_batch(request):
|
|||
active_types = {'激活': 1, '禁用': 0}
|
||||
dept_id = get_user_dept(request)
|
||||
if request.method == 'POST':
|
||||
multi_hosts = request.POST.get('j_multi').split('\n')
|
||||
multi_hosts = request.POST.get('j_multi').splitlines()
|
||||
for host in multi_hosts:
|
||||
if host == '':
|
||||
break
|
||||
|
@ -927,4 +927,4 @@ def host_search(request):
|
|||
posts = list(set(post_all) & set(post_perm))
|
||||
contact_list, p, contacts, page_range, current_page, show_first, show_end = pages(posts, request)
|
||||
|
||||
return my_render('jasset/host_search.html', locals(), request)
|
||||
return my_render('jasset/host_search.html', locals(), request)
|
||||
|
|
Loading…
Reference in New Issue