
class MultipleIDMixin(object):
    """
    Override get_queryset for multiple id support
    """
    def get_queryset(self):
        """
        Override :meth:``get_queryset``
        """
        ids = dict(getattr(self.request, 'query_params', self.request.QUERY_PARAMS)).get('ids[]')
        if ids:
            self.queryset = self.queryset.filter(id__in=ids)
        return self.queryset



class MultipleIDMixin(object):
    """
    Override get_queryset for multiple id support
    """
    def get_queryset(self):
        """
        Override :meth:``get_queryset``
        """
        if hasattr(self.request, 'query_params'):
            ids = dict(self.request.query_params).get('ids[]')
        else:
            ids = dict(self.request.QUERY_PARAMS).get('ids[]')
        if ids:
            self.queryset = self.queryset.filter(id__in=ids)
        return self.queryset


Fix for deprecation of `request.QUERY_PARAMS` in DRF 3.2`
Fix for deprecation of `request.QUERY_PARAMS` in DRF 3.2`

  
  class MultipleIDMixin(object):
      """
      Override get_queryset for multiple id support
      """
      def get_queryset(self):
          """
          Override :meth:``get_queryset``
          """
-         ids = dict(getattr(self.request, 'query_params', self.request.QUERY_PARAMS)).get('ids[]')
+         if hasattr(self.request, 'query_params'):
+             ids = dict(self.request.query_params).get('ids[]')
+         else:
+             ids = dict(self.request.QUERY_PARAMS).get('ids[]')
          if ids:
              self.queryset = self.queryset.filter(id__in=ids)
          return self.queryset
  
  
Fix for deprecation of `request.QUERY_PARAMS` in DRF 3.2`
## Code Before:

class MultipleIDMixin(object):
    """
    Override get_queryset for multiple id support
    """
    def get_queryset(self):
        """
        Override :meth:``get_queryset``
        """
        ids = dict(getattr(self.request, 'query_params', self.request.QUERY_PARAMS)).get('ids[]')
        if ids:
            self.queryset = self.queryset.filter(id__in=ids)
        return self.queryset


## Instruction:
Fix for deprecation of `request.QUERY_PARAMS` in DRF 3.2`
## Code After:

class MultipleIDMixin(object):
    """
    Override get_queryset for multiple id support
    """
    def get_queryset(self):
        """
        Override :meth:``get_queryset``
        """
        if hasattr(self.request, 'query_params'):
            ids = dict(self.request.query_params).get('ids[]')
        else:
            ids = dict(self.request.QUERY_PARAMS).get('ids[]')
        if ids:
            self.queryset = self.queryset.filter(id__in=ids)
        return self.queryset

