* cc: jakerothenbuhler@… (added)
* ui_ux: => 0
* easy: => 0
--
Ticket URL: <https://code.djangoproject.com/ticket/6870#comment:12>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* cc: jashugan (added)
Comment:
The original use-case still exists for generic relations, which does not
support the on_delete functionality given by #7593.
--
Ticket URL: <https://code.djangoproject.com/ticket/6870#comment:13>
Comment (by ambv):
There are more use-cases than that. One of those is Admin's object
deletion. Let me give you an example:
I have a `Team` model and a `Member` model. `Team`s have `Member`s.
Trivial stuff. I also log every change on a `Team` or its `Member`s by
creating `LogEntry` objects. So, when a `Member` is deleted, I have a
`pre_delete` signal that saves the `LogEntry` ("member parted") for the
related `Team`. Now, when I try to delete a `Team` from the Admin, during
deletion of existing `Member`s, log entries are created by the
`pre_delete` signal and the transaction fails.
Currently as a workaround you have to either let orphaned objects litter
the DB by using `on_delete` or to create another `pre_delete` signal for
the `Team` model which does `instance.logentry_set.all().delete()`.
--
Ticket URL: <https://code.djangoproject.com/ticket/6870#comment:14>
Comment (by anonymous):
I've run in the same problem, not easy to debug. I'd be great to see it
fixed someday.
--
Ticket URL: <https://code.djangoproject.com/ticket/6870#comment:15>
Comment (by Tiedye):
Will this be addressed at any point? I've been running into this issue
for the past month.
--
Ticket URL: <https://code.djangoproject.com/ticket/6870#comment:16>