Reputation: 14978
How do I run the Where IN query in Django ORM and iterate it? The following returns nothing:
Where IN
user_ids = Wallet.objects.filter(customer_id=[sender_id,reciever_id]) print(user_ids)
Upvotes: 0
Views: 22
Reputation: 88459
You can use in--(doc) lookup as
in
user_ids = Wallet.objects.filter(customer_id__in=[sender_id,reciever_id])
Upvotes: 2