Fix serializer set_password bug
This commit is contained in:
parent
06fffca262
commit
ced94ae019
|
@ -473,6 +473,11 @@ class MyPasswordChangeSerializer(PasswordChangeSerializer):
|
|||
logger.info(msg)
|
||||
raise ValidationError(dict(non_field_errors=msg))
|
||||
|
||||
data = dict(
|
||||
username=self.user.username,
|
||||
password=self.data['new_password1'],
|
||||
)
|
||||
|
||||
if utils_auth.is_configured():
|
||||
if utils_auth.set_password(data) != 200:
|
||||
msg = 'Problem connecting to Auth server: set.'
|
||||
|
@ -502,6 +507,11 @@ class MyPasswordResetConfirmSerializer(PasswordResetConfirmSerializer):
|
|||
logger.info(msg)
|
||||
raise ValidationError(dict(non_field_errors=msg))
|
||||
|
||||
data = dict(
|
||||
username=self.user.username,
|
||||
password=self.data['new_password1'],
|
||||
)
|
||||
|
||||
if utils_auth.is_configured():
|
||||
if utils_auth.set_password(data) != 200:
|
||||
msg = 'Problem connecting to Auth server: set.'
|
||||
|
|
Loading…
Reference in New Issue
Block a user