From dcfd4e05ec9a12dbf2e55b95b8c2289b4d36fc1a Mon Sep 17 00:00:00 2001 From: ibuler Date: Thu, 4 Jun 2015 10:15:41 +0800 Subject: [PATCH] modify sudo cmd bug --- jperm/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jperm/views.py b/jperm/views.py index a9eec6aaa..c5bfdfb03 100644 --- a/jperm/views.py +++ b/jperm/views.py @@ -482,7 +482,7 @@ def cmd_add(request): if request.method == 'POST': name = request.POST.get('name') dept_id = request.POST.get('dept_id') - cmd = ','.join(request.POST.get('cmd').split()) + cmd = ','.join(request.POST.get('cmd').split('\n')) comment = request.POST.get('comment') dept = DEPT.objects.filter(id=dept_id) @@ -512,7 +512,7 @@ def cmd_add_adm(request): if request.method == 'POST': name = request.POST.get('name') - cmd = ','.join(request.POST.get('cmd').split()) + cmd = ','.join(request.POST.get('cmd').split('\n')) comment = request.POST.get('comment') try: