django__django-12663
Using SimpleLazyObject with a nested subquery annotation fails.
Verdict: the fix is stated in the issue (Tier A).
in order to allow the special related field lookup conversion of SimpleLazyObject to model instance (e.g. needed for stuff like .filter(user=request.user) where request.user is a SimpleLazyObject) it's the Col.target that should be used as output_field and not Col.field.
The text states the fix: “in order to allow the special related field lookup conversion of SimpleLazyObject to model instance (e.g. needed for stuff like .filter(user=request.user) where request.…”
All SWE-bench Verified tasks · more django/django tasks · How the check works