Leaklens

django__django-15814

QuerySet.only() after select_related() crash on proxy models.

Verdict: the fix is stated in the issue (Tier A).

I would fix cur_model instead: cur_model = cur_model._meta.concrete_model opts = cur_model._meta

The text states the fix: “At django/db/models/sql/query.py in 745 line there is snippet: opts = cur_model._meta If I replace it by opts = cur_model._meta.concrete_model._meta all works as expecte…”

All SWE-bench Verified tasks · more django/django tasks · How the check works