mirror of
https://github.com/django/django.git
synced 2025-10-26 07:06:08 +00:00
[4.2.x] Fixed #34803 -- Fixed queryset crash when filtering againts deeply nested OuterRef annotations.
Thanks Pierre-Nicolas Rigal for the report. Regression inc67ea79aa9. Backport of9cc0d7f7f8from main
This commit is contained in:
committed by
Mariusz Felisiak
parent
55a0b9c32e
commit
acfb427522
@@ -8,6 +8,9 @@ from django.db import models
|
||||
|
||||
class Manager(models.Model):
|
||||
name = models.CharField(max_length=50)
|
||||
secretary = models.ForeignKey(
|
||||
"Employee", models.CASCADE, null=True, related_name="managers"
|
||||
)
|
||||
|
||||
|
||||
class Employee(models.Model):
|
||||
@@ -15,6 +18,7 @@ class Employee(models.Model):
|
||||
lastname = models.CharField(max_length=50)
|
||||
salary = models.IntegerField(blank=True, null=True)
|
||||
manager = models.ForeignKey(Manager, models.CASCADE, null=True)
|
||||
based_in_eu = models.BooleanField(default=False)
|
||||
|
||||
def __str__(self):
|
||||
return "%s %s" % (self.firstname, self.lastname)
|
||||
|
||||
Reference in New Issue
Block a user