Return all serializer field values in RegisterSerializer#get_cleaned_data

This commit is contained in:
Ruben Grill 2016-10-14 16:42:40 +02:00
parent 3b80fcbca9
commit 6c0e2d45bb

View File

@ -150,11 +150,11 @@ class RegisterSerializer(serializers.Serializer):
pass pass
def get_cleaned_data(self): def get_cleaned_data(self):
return { data = self.validated_data
'username': self.validated_data.get('username', ''), data.setdefault('username', '')
'password1': self.validated_data.get('password1', ''), data.setdefault('password1', '')
'email': self.validated_data.get('email', '') data.setdefault('email', '')
} return data
def save(self, request): def save(self, request):
adapter = get_adapter() adapter = get_adapter()