#18491 closed Bug (fixed)
When deleting a proxy model, the admin does not show warning about cascade delete for object with foreign key on the proxied model
| Reported by: | Owned by: | Grzegorz Szczepańczyk | |
|---|---|---|---|
| Component: | contrib.admin | Version: | 1.4 |
| Severity: | Normal | Keywords: | |
| Cc: | Triage Stage: | Ready for checkin | |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
Suppose this
class A(Model):
pass
class ProxyA(A):
class Meta:
proxy = True
class B(Model):
a = ForeignKey(A)
If you expose ProxyA in the admin/ and try to delete an instance which has linked B objects, there will be no warning about the cascading delete.
Change History (11)
comment:1 by , 13 years ago
comment:3 by , 13 years ago
| Owner: | changed from to |
|---|---|
| Status: | new → assigned |
comment:4 by , 13 years ago
| Has patch: | set |
|---|
I have added pull request with fix: https://github.com/django/django/pull/774
comment:7 by , 13 years ago
| Resolution: | → fixed |
|---|---|
| Status: | assigned → closed |
comment:8 by , 12 years ago
Fixing this seems to have introduced another regression, see #20777. We may revert this fix if we can't come up with a solution for that.
comment:10 by , 12 years ago
Fix has been reverted in 1.6.x, but will remain in master and removed (but fixed via a new change) in https://github.com/django/django/pull/1478
comment:11 by , 12 years ago
Fixed again in 3844089edc43ff29aab5bac82a0eecab23d8d14a - the fix isn't in 1.6.x, only master.
Here's the history of bugs related to deletion of proxy models: #18083, #16128, #12208, #11116.