From c89f40aa1fda4116812f3e7985cd47ccd51b45b5 Mon Sep 17 00:00:00 2001 From: Aroy-Art Date: Thu, 10 Apr 2025 22:34:47 +0200 Subject: [PATCH 1/2] Remove: old comment --- backend/api/user/management/commands/backfill_user_profiles.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/api/user/management/commands/backfill_user_profiles.py b/backend/api/user/management/commands/backfill_user_profiles.py index 1fe7275..48237cd 100644 --- a/backend/api/user/management/commands/backfill_user_profiles.py +++ b/backend/api/user/management/commands/backfill_user_profiles.py @@ -1,7 +1,7 @@ # api/user/management/commands/backfill_user_profiles.py from django.core.management.base import BaseCommand from django.contrib.auth.models import User -from api.user.models import UserProfile # assuming you have a UserProfile model +from api.user.models import UserProfile class Command(BaseCommand): From 14f9487919d6fa2d2264612a0f06bfb2d8d20489 Mon Sep 17 00:00:00 2001 From: Aroy-Art Date: Thu, 10 Apr 2025 22:35:55 +0200 Subject: [PATCH 2/2] 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():