Fixed #26551 -- Fixed negated Q() queries that span relations.

Prevented queries from reusing trimmed joins.
This commit is contained in:
François Freitag 2016-10-26 18:01:37 -04:00 committed by Tim Graham
parent ad36e5480d
commit e124d2da94
4 changed files with 26 additions and 4 deletions

View file

@ -648,8 +648,6 @@ class Employment(models.Model):
title = models.CharField(max_length=128)
# Bug #22429
class School(models.Model):
pass
@ -659,6 +657,8 @@ class Student(models.Model):
class Classroom(models.Model):
name = models.CharField(max_length=20)
has_blackboard = models.NullBooleanField()
school = models.ForeignKey(School, models.CASCADE)
students = models.ManyToManyField(Student, related_name='classroom')