From 14f9487919d6fa2d2264612a0f06bfb2d8d20489 Mon Sep 17 00:00:00 2001 From: Aroy-Art Date: Thu, 10 Apr 2025 22:35:55 +0200 Subject: [PATCH] Fix: comments in user serializer --- backend/api/user/serializers.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/backend/api/user/serializers.py b/backend/api/user/serializers.py index 1c10d23..8dd9033 100644 --- a/backend/api/user/serializers.py +++ b/backend/api/user/serializers.py @@ -30,9 +30,13 @@ class UserSerializer(serializers.ModelSerializer): # Update the UserProfile instance if profile_data: - userprofile_instance = instance.userprofile # The related UserProfile instance + userprofile_instance = ( + instance.userprofile + ) # The related UserProfile instance profile_serializer = self.fields["profile"] # Get the nested serializer - profile_serializer.update(userprofile_instance, profile_data) # Update the UserProfile + profile_serializer.update( + userprofile_instance, profile_data + ) # Update the UserProfile # Update the User fields for attr, value in validated_data.items():