Ticket #13416: django_ticket_13416.diff
File django_ticket_13416.diff, 1.0 KB (added by , 15 years ago) |
---|
-
django/db/models/base.py
606 606 else: 607 607 # m2m-ish but with no through table? GenericRelation: cascade delete 608 608 for sub_obj in f.value_from_object(self).all(): 609 # Generic relations not enforced by db constraints, thus we can set 610 # nullable=True, order does not matter 611 sub_obj._collect_sub_objects(seen_objs, self, True) 609 # Generic relations not enforced by db constraints, but don't 610 # set nullable=True because post_delete hook might rely on 611 # parent object being in db. 612 sub_obj._collect_sub_objects(seen_objs, self, False) 612 613 613 614 # Handle any ancestors (for the model-inheritance case). We do this by 614 615 # traversing to the most remote parent classes -- those with no parents