title: Django: Filtering a related field by date yields unwanted results
body: <p>models:</p>
  <pre><code>class Vehicle(models.Model):
      licence_plate = models.CharField(max_length=16)
  
  class WorkTime(models.Model):
      work_start = models.DateTimeField()
      work_end = models.DateTimeField()
      vehicle = models.ForeignKey(Vehicle, on_delete=models.SET_NULL, related_name=&quot;work_times&quot;)
  </code></pre>
  <p>However when I try to filter those working times using:</p>
  <pre><code>qs = Vehicle.objects.filter(
  work_times__work_start__date__gte=&quot;YYYY-MM-DD&quot;,
  work_times__work_end__date__lte=&quot;YYYY-MM-DD&quot;).distinct()
  </code></pre>
  <p>I get results that do not fit the timeframe given. Most commonly when the work_end fits to something, it returns everything from WorkTime</p>
  <p>What I would like to have:</p>
  <pre><code>for vehicle in qs:
      for work_time in vehicle.work_times:
          print(vehicle, work_time.work_start, work_time.work_end)
  </code></pre>