def get_queryset(self):
queryset = self.model.objects.all()<EOL>analysis_uuid = self.request.query_params.get('<STR_LIT>', None)<EOL>item_uuid = self.request.query_params.get('<STR_LIT>', None)<EOL>if analysis_uuid is not None:<EOL><INDENT>queryset = queryset.filter(analysis__uuid__startswith=analysis_uuid)<EOL><DEDENT>if item_uuid is not None:<EOL><INDENT>queryset = queryset.filter(item__uuid__startswith=item_uuid)<EOL><DEDENT>return queryset<EOL>
Optionally restricts the returned purchases analysis track to
a given analysis and/or a given item,
by filtering against `analysis` and `item` query parameters in the URL.
The query parameters values should be the uuid of the analysis or of the item