Fixed #15823 - incorrect join condition when combining Q objects

Thanks to dcwatson for the excellent report and patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16159 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Luke Plant 2011-05-05 20:26:26 +00:00
parent 970ae01620
commit db5807bdb1
3 changed files with 41 additions and 1 deletions

View file

@ -31,3 +31,16 @@ class Comment(models.Model):
def __unicode__(self):
return self.comment_text
# Ticket 15823
class Item(models.Model):
title = models.CharField(max_length=100)
class PropertyValue(models.Model):
label = models.CharField(max_length=100)
class Property(models.Model):
item = models.ForeignKey(Item, related_name='props')
key = models.CharField(max_length=100)
value = models.ForeignKey(PropertyValue, null=True)