diff --git a/views.py b/views.py index 9894e6f..73b6e38 100644 --- a/views.py +++ b/views.py @@ -549,7 +549,10 @@ password=form.cleaned_data["password"]) if user is not None: if user.is_active: - redirect(request.GET["next"]) + if "next" in request.GET.keys(): + return redirect(request.GET["next"]) + else: + return redirect("list_index") else: error= _("Your account has been disabled!") else: