misc: use set_random_password() in csv_import (#47943)
This commit is contained in:
parent
4a2305459f
commit
9fe6ce378f
|
@ -39,7 +39,7 @@ from authentic2.a2_rbac.utils import get_default_ou
|
|||
from authentic2.custom_user.models import User
|
||||
from authentic2.forms.profile import modelform_factory, BaseUserForm
|
||||
from authentic2.models import Attribute, AttributeValue, UserExternalId
|
||||
from authentic2.utils import send_password_reset_mail, generate_password
|
||||
from authentic2.utils import send_password_reset_mail
|
||||
|
||||
Role = get_role_model()
|
||||
|
||||
|
@ -673,7 +673,7 @@ class UserCsvImporter(object):
|
|||
|
||||
if not user:
|
||||
user = User(ou=self.ou)
|
||||
user.set_password(generate_password())
|
||||
user.set_random_password()
|
||||
|
||||
for cell in row.cells:
|
||||
if not cell.header.field:
|
||||
|
|
Loading…
Reference in New Issue