Fixed #36432 -- Fixed a prefetch_related crash on related target subclass queryset.
Some checks are pending
Docs / docs (push) Waiting to run
Docs / blacken-docs (push) Waiting to run
Linters / flake8 (push) Waiting to run
Linters / isort (push) Waiting to run
Linters / black (push) Waiting to run
Tests / Windows, SQLite, Python 3.13 (push) Waiting to run
Tests / JavaScript tests (push) Waiting to run

Regression in 626d77e52a.

Refs #36116.

Thanks Cornelis Poppema for the excellent report.
This commit is contained in:
Simon Charette 2025-06-03 22:34:39 -04:00 committed by Sarah Boyce
parent c075508b4d
commit 08187c94ed
4 changed files with 25 additions and 1 deletions

View file

@ -43,3 +43,7 @@ Bugfixes
<django.http.HttpRequest.get_preferred_type>` did not account for media type
parameters in ``Accept`` headers, reducing specificity in content negotiation
(:ticket:`36411`).
* Fixed a regression in Django 5.2 that caused a crash when using
``QuerySet.prefetch_related()`` to prefetch a foreign key with a ``Prefetch``
queryset for a subclass of the foreign target (:ticket:`36432`).