title: Filter is not working properly in Django REST Framework
body: <p>This is my TestViewSet.</p>
  <pre><code>class TestViewSet(ListAPIView, CreateAPIView, UpdateAPIView):
  permission_classes = [
      IsAuthenticated,
  ]
  pagination_class = CustomPagination
  serializer_class = TestSerializer
  model = Test
  create_class = CreateTestSerializer
  filter_backends = [DjangoFilterBackend]
  filterset_fields = ['department__name', 'code', 'billing_category__id', 'billing_category__name']
  
  def get_queryset(self):
      name_str = self.request.query_params.get(&quot;name&quot;)
      department_id = self.request.query_params.get(&quot;department_id&quot;)
      pk = self.kwargs.get(&quot;id&quot;)
      self.pagination_class.page_size = page_size
      if name_str is not None:
          return self.model.objects.filter(
              Q(name__icontains=name_str)
              | Q(name__iexact=name_str)
              | Q(name__istartswith = name_str)
              )
      elif pk is not None:
          return self.model.objects.filter(id=pk)
      elif department_id is not None:
          return self.model.objects.filter(department_id=department_id)
      else:
          return self.model.objects.all()
  </code></pre>
  <p><strong>name</strong> is CharField and <strong>department</strong> is ForeignKey in Test Model.</p>
  <p>When i am passing this url - <a href="http://127.0.0.1:8000/api/v1/package/test/?name=fun&amp;department_id=7" rel="nofollow noreferrer">http://127.0.0.1:8000/api/v1/package/test/?name=fun&amp;department_id=7</a>  It is ignoring deparment_id. I just don't know why. Individually both are working fine. I'm wondering why it is ignoring deparment_id ? Thank you !!</p>