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