musician crypt password when create mailboxuser
This commit is contained in:
parent
5c0c82d50b
commit
60771b7808
|
@ -137,6 +137,12 @@ class MailboxCreateForm(forms.ModelForm):
|
||||||
)
|
)
|
||||||
return password
|
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):
|
def save(self, commit=True):
|
||||||
instance = super().save(commit=False)
|
instance = super().save(commit=False)
|
||||||
instance.account = self.user
|
instance.account = self.user
|
||||||
|
|
Loading…
Reference in New Issue