Coverage for src/accounts/views/user_profile.py: 75%
8 statements
« prev ^ index » next coverage.py v7.9.2, created at 2025-08-04 12:59 +0300
« prev ^ index » next coverage.py v7.9.2, created at 2025-08-04 12:59 +0300
1from rest_framework.generics import RetrieveUpdateDestroyAPIView
3from src.accounts.models.user_profile import UserProfile
4from src.accounts.serializers.user_profile import UserProfileSerializer
7class UserProfileView(RetrieveUpdateDestroyAPIView):
8 serializer_class = UserProfileSerializer
10 def get_object(self):
11 profile, _ = UserProfile.objects.get_or_create(user=self.request.user)
13 return profile