mirror of
https://github.com/django/django.git
synced 2025-09-24 19:23:03 +00:00
Fixed #12953 -- Ensure that deletion cascades through generic relations. Also cleans up the special-casing of generic relations in the deleted object discovery process. Thanks to carljm for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12790 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
d8c9d21c33
commit
2d57300f52
6 changed files with 168 additions and 125 deletions
|
@ -1278,8 +1278,6 @@ def delete_objects(seen_objs, using):
|
|||
signals.pre_delete.send(sender=cls, instance=instance)
|
||||
|
||||
pk_list = [pk for pk,instance in items]
|
||||
del_query = sql.DeleteQuery(cls)
|
||||
del_query.delete_batch_related(pk_list, using=using)
|
||||
|
||||
update_query = sql.UpdateQuery(cls)
|
||||
for field, model in cls._meta.get_fields_with_model():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue