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():