mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #21150 -- select_related + annotate join promotion failure
Added tests for a .annotate().select_related() join promotion failure. This happened to work on master but was currently untested.
This commit is contained in:
@@ -87,3 +87,14 @@ class HardbackBook(Book):
|
||||
|
||||
def __str__(self):
|
||||
return "%s (hardback): %s" % (self.name, self.weight)
|
||||
|
||||
# Models for ticket #21150
|
||||
class Alfa(models.Model):
|
||||
pass
|
||||
|
||||
class Bravo(models.Model):
|
||||
pass
|
||||
|
||||
class Charlie(models.Model):
|
||||
alfa = models.ForeignKey(Alfa, null=True)
|
||||
bravo = models.ForeignKey(Bravo, null=True)
|
||||
|
||||
Reference in New Issue
Block a user