diff --git a/juser/views.py b/juser/views.py index 81e854d85..7335f30c8 100644 --- a/juser/views.py +++ b/juser/views.py @@ -419,7 +419,9 @@ def change_info(request): error = '不能为空' if not error: - User.objects.filter(id=user_id).update(name=name, email=email) + user.name = name + user.email = email + user.save() if len(password) > 0: user.set_password(password) user.save()