[Answer]-Filter by presence in a model's set

1👍

Without your model definitions it is very difficult to provide an exact answer to your question, something like the below could work:

Customer.objects.filter(location__in=your_customer_instance.location_set.all()).exclude(pk=your_customer_instance.pk)

Leave a comment