diff --git a/equipment_tracker/accounts/serializers.py b/equipment_tracker/accounts/serializers.py index f862d18..d878cce 100644 --- a/equipment_tracker/accounts/serializers.py +++ b/equipment_tracker/accounts/serializers.py @@ -43,3 +43,10 @@ class UserRegistrationSerializer(serializers.ModelSerializer): ) return super().validate(attrs) + + def create(self, validated_data): + user = self.Meta.model(**validated_data) + user.set_password(validated_data['password']) + user.save() + + return user