fix the staff username field to email

This commit is contained in:
ismail 2025-05-25 13:41:31 +03:00
parent 0a38ee0a28
commit ccc3217b03

View File

@ -2658,7 +2658,7 @@ class UserCreateView(
password = "Tenhal@123"
user = User.objects.create_user(
username=form.cleaned_data["name"], email=email, password=password
username=email, email=email, password=password
)
user.is_staff = True
user.save()