Changes between Initial Version and Version 1 of Ticket #23076, comment 23
- Timestamp:
- Jan 21, 2026, 1:59:26 PM (2 weeks ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #23076, comment 23
initial v1 1 1 I am the current maintainer of [https://github.com/jazzband/django-polymorphic django-polymorphic]. I'm closing this ticket because this issue has been fixed downstream in [https://github.com/jazzband/django-polymorphic django-polymorphic] without needing to touch any Django internals. 2 2 3 As explained in the [https://github.com/jazzband/django-polymorphic/pull/746 downstream PR] there is nothing special about the deletion of polymorphic querysets. The django deletion code traverses the model graph both children and parents and deletes all of the necessary rows in order. The operation is identical for polymorphic models, the issue is that querysets returning subclasses of the queryset model was confusing the graph traversal algorithm. It is therefore more appropriate to modify custom querysets and wrap collectors for these special cases than to make the defaultcollector logic robust to it.3 As explained in the [https://github.com/jazzband/django-polymorphic/pull/746 downstream PR] there is nothing special about the deletion of polymorphic querysets. The django deletion code traverses the model graph both children and parents and deletes all of the necessary rows in order. The operation is identical for polymorphic models, the issue is that querysets returning subclasses of the queryset model was confusing the graph traversal algorithm. It is therefore more appropriate to modify custom querysets and wrap collectors for these special cases than to make the core collector logic robust to it.