Opened 9 years ago
Closed 9 years ago
#27581 closed Bug (fixed)
Second-level proxy fails to inherit reverse relation from parent proxy
| Reported by: | Shai Berger | Owned by: | nobody |
|---|---|---|---|
| Component: | Database layer (models, ORM) | Version: | 1.8 |
| Severity: | Normal | Keywords: | |
| Cc: | Triage Stage: | Unreviewed | |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
Double proxy models are, as has been noted before, a questionable design decision, but they should still work (the reason here: we need more than one Admin interface for the parent proxy class). We have, basically, this:
class A(models.Model):
pass
class B(A):
class Meta:
proxy=True
class F(models.Model):
b = models.ForeignKey(B, related_name="bffs")
class C(B):
class Meta:
proxy=True
and when we try
qset = C.objects.filter(bffs__in=whatever)
we get "bffs not recognized, options are ..."
Not sure if this still happens with master, will try to repro later.
Change History (2)
comment:1 by , 9 years ago
comment:2 by , 9 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
I confirmed this was fixed in Django 1.10.
Note:
See TracTickets
for help on using tickets.
This should be fixed by 5b980897f2da3c048d88029af554e0fc4be68a8e in 1.10 and master.