Skip to content

Commit

Permalink
Clarify new password error message
Browse files Browse the repository at this point in the history
"Your password has not changed" might imply there was an error changing your password, rather than you didn't change it
  • Loading branch information
James Turnbull authored and adam-thomas committed Sep 30, 2015
1 parent 747cfb6 commit e9c5e89
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion user_management/api/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def validate_new_password2(self, attrs, source):

def validate(self, attrs):
if attrs.get('old_password') == attrs.get('new_password'):
msg = _('Your password has not changed.')
msg = _('Your new password must not be the same as your old password.')
raise serializers.ValidationError({'new_password': msg})
return attrs

Expand Down

0 comments on commit e9c5e89

Please sign in to comment.