[Answered ]-Django DRF get_queryset, how to join two models?

1👍

You only need to filter based in the status of the history you can do the following:

if self.request.GET.get('status'):
    queryset = queryset.filter(statushistory__status=self.request.GET.get('status'))

Leave a comment