1👍
✅
Try this:
qs0 = Person.objects.filter(...)
qs = qs0.exclude(is_child=True, parent__in=qs0)
👤Udi
Source:stackexchange.com
1👍
Try this:
qs0 = Person.objects.filter(...)
qs = qs0.exclude(is_child=True, parent__in=qs0)