mirror of
https://github.com/Tivix/django-rest-auth.git
synced 2024-11-24 10:03:44 +03:00
Translate msg when providing incorrect old password
This commit is contained in:
parent
479a40d2cc
commit
c437ca22ff
|
@ -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