Fix serializer set_password bug

This commit is contained in:
Tanner Collin 2020-09-27 04:03:24 +00:00
parent 06fffca262
commit ced94ae019

View File

@ -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.'