mirror of
https://github.com/django/django.git
synced 2025-08-04 02:48:35 +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:
parent
20472aa827
commit
ed0d720b78
2 changed files with 30 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue