<commit_before>"""
Class Mixins.
"""
from django.db import IntegrityError
from django.http import Http404


class MultipleIDMixin(object):
    """
    Override get_queryset for multiple id support
    """
    def get_queryset(self):
        """
        Override :meth:``get_queryset``
        """
        if hasattr(self.request, 'query_params') and 'ids' in self.request.query_params:
            query_param_ids = self.request.query_params.get('ids')
            ids = [] if not query_param_ids else query_param_ids.split(',')

            try:
                self.queryset = self.queryset.filter(pk__in=ids)
            except (ValueError, IntegrityError):
                raise Http404
        return self.queryset<commit_msg>Update query param for mixin<commit_after>"""
Class Mixins.
"""
from django.db import IntegrityError
from django.http import Http404


class MultipleIDMixin(object):
    """
    Override get_queryset for multiple id support
    """
    def get_queryset(self):
        """
        Override :meth:``get_queryset``
        """
        if hasattr(self.request, 'query_params') and 'filter[id]' in self.request.query_params:
            query_param_ids = self.request.query_params.get('filter[id]')
            ids = [] if not query_param_ids else query_param_ids.split(',')

            try:
                self.queryset = self.queryset.filter(pk__in=ids)
            except (ValueError, IntegrityError):
                raise Http404
        return self.queryset
{'fraction_non_alphanumeric': 0.10596914822266935, 'fraction_numerical': 0.008048289738430584, 'mean_word_length': 2.5271867612293146, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2347012', 'n_tokens_mistral': 448, 'n_tokens_neox': 422, 'n_words': 99}