From f1fee7a4cc9778c3e46e3eb9293ff6f7ece867b1 Mon Sep 17 00:00:00 2001 From: Girik Bajaj Date: Sun, 10 Sep 2023 13:41:27 +0530 Subject: [PATCH] Update serializers.md Corrected class name in example --- docs/api-guide/serializers.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/api-guide/serializers.md b/docs/api-guide/serializers.md index 0f355c76d..0e311f470 100644 --- a/docs/api-guide/serializers.md +++ b/docs/api-guide/serializers.md @@ -382,7 +382,7 @@ For example, suppose we wanted to ensure that `User` instances and `Profile` ins This manager class now more nicely encapsulates that user instances and profile instances are always created at the same time. Our `.create()` method on the serializer class can now be re-written to use the new manager method. def create(self, validated_data): - return User.objects.create( + return UserManager.objects.create( username=validated_data['username'], email=validated_data['email'], is_premium_member=validated_data['profile']['is_premium_member'],