Fix: serializer should handle right password filed names

This commit is contained in:
winkidney
2019-12-05 20:18:05 +08:00
committed by Isaac Bythewood
parent 41cac8e784
commit c1cff2ecb6

View File

@@ -39,7 +39,7 @@ class UserSerializer(serializers.HyperlinkedModelSerializer):
)
def create(self, validated_data):
if validated_data['password'] != validated_data['password']:
if validated_data['password'] != validated_data['password_repeat']:
raise ValidationError(
detail={
"password_repeat": "Tow password doesn't match",