From f54cda21c183ccb57df220855e9280679a90aaab Mon Sep 17 00:00:00 2001 From: Benjamin Dauvergne Date: Thu, 5 Nov 2020 18:43:22 +0100 Subject: [PATCH 2/4] misc: use set_random_password() in csv_import (#47943) --- src/authentic2/csv_import.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/authentic2/csv_import.py b/src/authentic2/csv_import.py index 79ae718a..6fe185d2 100644 --- a/src/authentic2/csv_import.py +++ b/src/authentic2/csv_import.py @@ -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() @@ -672,7 +672,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: -- 2.29.1