From 60771b78087f92edbfc32c4f994184d21de08583 Mon Sep 17 00:00:00 2001 From: jorgepastorr Date: Thu, 18 Apr 2024 16:58:37 +0200 Subject: [PATCH] musician crypt password when create mailboxuser --- orchestra/contrib/musician/forms.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/orchestra/contrib/musician/forms.py b/orchestra/contrib/musician/forms.py index 791f3699..e7e9937e 100644 --- a/orchestra/contrib/musician/forms.py +++ b/orchestra/contrib/musician/forms.py @@ -136,6 +136,12 @@ class MailboxCreateForm(forms.ModelForm): code='password_mismatch', ) return password + + def clean(self): + cleaned_data = super().clean() + password = cleaned_data.get("password") + cleaned_data['password'] = make_password(password) + return cleaned_data def save(self, commit=True): instance = super().save(commit=False)