fix line break bug on add multiple hosts

pull/13/head
Jiajun Liu 2015-07-07 18:12:25 +08:00
parent b8dfb26a3a
commit f5e57da106
1 changed files with 2 additions and 2 deletions

View File

@ -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)