diff --git a/webroot/AutoSa/AutoSa/views.py b/webroot/AutoSa/AutoSa/views.py index 7734cf663..c1a2f2080 100644 --- a/webroot/AutoSa/AutoSa/views.py +++ b/webroot/AutoSa/AutoSa/views.py @@ -470,6 +470,8 @@ def chgUser(request): if request.method == "GET": username = request.GET.get('username') + if not username: + return HttpResponseRedirect('/showUser/') user = User.objects.get(username=username) groups = user.group.all() if user.is_admin: diff --git a/webroot/AutoSa/templates/chgUser.html b/webroot/AutoSa/templates/chgUser.html index e1a6f8407..7a023d5fb 100644 --- a/webroot/AutoSa/templates/chgUser.html +++ b/webroot/AutoSa/templates/chgUser.html @@ -41,25 +41,25 @@