diff --git a/locker_server/core/services/family_service.py b/locker_server/core/services/family_service.py index b41a690..293ca05 100644 --- a/locker_server/core/services/family_service.py +++ b/locker_server/core/services/family_service.py @@ -62,7 +62,7 @@ def destroy_family_member(self, user_id: int, family_member_id: int): ) if not family_member: raise UserPlanFamilyDoesNotExistException - if family_member.user.user_id == user_id: + if family_member.user is not None and family_member.user.user_id == user_id: raise UserPlanFamilyDoesNotExistException # Downgrade the plan of the member user family_user_id, family_email = self.user_plan_repository.delete_family_member(family_member_id=family_member_id)