From b1c061d7274ba382355ce7f921e7074bd5d0810b Mon Sep 17 00:00:00 2001 From: wlorenzetti Date: Wed, 22 Jan 2025 08:31:18 +0100 Subject: [PATCH] Fix for update user password --- g3w-admin/usersmanage/forms.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/g3w-admin/usersmanage/forms.py b/g3w-admin/usersmanage/forms.py index 79f6da72a..70acba0f7 100644 --- a/g3w-admin/usersmanage/forms.py +++ b/g3w-admin/usersmanage/forms.py @@ -14,6 +14,7 @@ from django.utils.datastructures import MultiValueDict from django.utils.translation import gettext_lazy as _ from django.contrib.auth.forms import ( +BaseUserCreationForm, UserCreationForm, ReadOnlyPasswordHashField, AuthenticationForm, @@ -565,6 +566,7 @@ def save(self, commit=True): user.set_password(self.cleaned_data['password1']) user.save() + # for save groups if 'groups' not in self.cleaned_data: self.cleaned_data['groups'] = self.request.user.groups.all() @@ -748,7 +750,6 @@ def clean_username(self): return username - def clean_password2(self): password1 = self.cleaned_data.get("password1") password2 = self.cleaned_data.get("password2")