Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#28096 closed Bug (fixed)

Cannot Prefetch() when queryset has ModelIterable subclass

Reported by: Claude Paroz Owned by: nobody
Component: Database layer (models, ORM) Version: 1.11
Severity: Normal Keywords: regression
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

I have a manager with a custom ModelIterable subclass. Unfortunately, I cannot prefetch on it because of the queryset._iterable_class is not ModelIterable line introduced in [7ec330eeb96d0874949eacb8ed1bbb97e11807e1].

Could that line make use of issubclass instead?

Change History (4)

comment:1 Changed 3 years ago by Claude Paroz

Has patch: set

comment:2 Changed 3 years ago by Tim Graham

Triage Stage: UnreviewedReady for checkin

comment:3 Changed 3 years ago by Claude Paroz <claude@…>

Resolution: fixed
Status: newclosed

In 43b4a161:

Fixed #28096 -- Allowed prefetch calls with ModelIterable subclasses

Regression in 7ec330eeb96d0874949eacb8ed1bbb97e11807e1.
Thanks Tim Graham for the review.

comment:4 Changed 3 years ago by Claude Paroz <claude@…>

In 61e883c:

[1.11.x] Fixed #28096 -- Allowed prefetch calls with ModelIterable subclasses

Regression in 7ec330eeb96d0874949eacb8ed1bbb97e11807e1.
Thanks Tim Graham for the review.
Backport of 43b4a1618ed85151494d68778a1bb6304ce1cb79 from master.

Note: See TracTickets for help on using tickets.
Back to Top