#23076: Cascaded deletion of polymorphic models fails
-------------------------------------+-------------------------------------
Reporter: jernej@… | Owner: nobody
Type: Bug | Status: new
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Jonathan Stray):
* status: closed => new
* resolution: fixed =>
Comment:
As of 1.11 there is still an `IntegrityError` when deleting `django-
polymorphic` objects with Postgres. As before this occurs when deleting a
set of polymorphic base objects, not all of which has the same polymorphic
subtype.
Looking over the related `django-polymorphic` [https://github.com/django-
polymorphic/django-polymorphic/issues/34 bug], there does not appear to be
any solution that could be implemented without changing Django core.
Perhaps something much more like this
[https://github.com/django/django/pull/2940 old pull request] will be
required. Or perhaps something like this
[https://gist.github.com/jmurty/2034c24b6f91a3eaf51a monkeypatch] for 1.8
linked from the `django-polymorhpic` bug. The
[https://gist.github.com/jmurty/2034c24b6f91a3eaf51a#file-django-proxy-
delete-hack-py-L36 core part] of that patch is closely related to the
proxy model deletion
[https://github.com/django/django/commit/211486f3ab5602cdc332f03cd03fad3cb929d154
fix] which closed this issue previously.
--
Ticket URL: <https://code.djangoproject.com/ticket/23076#comment:16>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/071.39ed4da36610ad344ab093517b3d64d5%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.