1👍
✅
Use exclude:
invite_user_list = User.objects.filter(is_active=True).exclude(id=request.user.id).exclude(friendship__friends__user=request.user)
Source:stackexchange.com