[Fixed]-Trouble finding the right django queryset for this

1👍

if I am getting right what would you like to achieve, try this:

objs = Bar.objects.filter(thing__pk__in=Foo.objects.all().order_by('-frequency').values_list('pk', flat=True)[:10])
👤sebb

Leave a comment