mirror of
https://github.com/Tivix/django-rest-auth.git
synced 2024-11-25 02:23:44 +03:00
Merge pull request #481 from OskarPersson/old-password-error-msg
Use translated msg when providing incorrect old password
This commit is contained in:
commit
4cf813262f
|
@ -256,7 +256,8 @@ class PasswordChangeSerializer(serializers.Serializer):
|
|||
)
|
||||
|
||||
if all(invalid_password_conditions):
|
||||
raise serializers.ValidationError('Invalid password')
|
||||
err_msg = _("Your old password was entered incorrectly. Please enter it again.")
|
||||
raise serializers.ValidationError(err_msg)
|
||||
return value
|
||||
|
||||
def validate(self, attrs):
|
||||
|
|
Loading…
Reference in New Issue
Block a user