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:
Russell Keith-Magee 2010-03-15 13:15:01 +00:00
parent d8c9d21c33
commit 2d57300f52
6 changed files with 168 additions and 125 deletions

View file

@ -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():