From 1f272aa03c59ab12223024ecfc0e4df506fe4f88 Mon Sep 17 00:00:00 2001 From: guanghongwei Date: Mon, 29 Sep 2014 16:05:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=80=E5=A4=A9=E4=BF=AE=E6=94=B910=E5=8F=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- webroot/AutoSa/AutoSa/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/webroot/AutoSa/AutoSa/views.py b/webroot/AutoSa/AutoSa/views.py index 636b206df..de19b1c7b 100644 --- a/webroot/AutoSa/AutoSa/views.py +++ b/webroot/AutoSa/AutoSa/views.py @@ -470,12 +470,12 @@ def chgUser(request): if request.method == "GET": username = request.GET.get('username') + if not username: + return HttpResponseRedirect('/showUser/') user = User.objects.get(username=username) is_admin = "checked" if user.is_admin else '' is_superuser = 'checked' if user.is_superuser else '' groups = user.group.all() - if not username: - return HttpResponseRedirect('/showUser/') return render_to_response('chgUser.html', {'user': user, 'user_menu': 'active', 'is_admin': is_admin,