Projet

Général

Profil

0002-misc-use-set_random_password-in-csv_import-47943.patch

Benjamin Dauvergne, 05 novembre 2020 18:46

Télécharger (1,19 ko)

Voir les différences:

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(-)
src/authentic2/csv_import.py
39 39
from authentic2.custom_user.models import User
40 40
from authentic2.forms.profile import modelform_factory, BaseUserForm
41 41
from authentic2.models import Attribute, AttributeValue, UserExternalId
42
from authentic2.utils import send_password_reset_mail, generate_password
42
from authentic2.utils import send_password_reset_mail
43 43

  
44 44
Role = get_role_model()
45 45

  
......
672 672

  
673 673
        if not user:
674 674
            user = User(ou=self.ou)
675
            user.set_password(generate_password())
675
            user.set_random_password()
676 676

  
677 677
        for cell in row.cells:
678 678
            if not cell.header.field:
679
-