Leaklens

django__django-15320

Subquery.as_sql() generates invalid SQL.

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

Adding Subquery().query.subquery = True attribute fixes the problem. From my point of view, it should be set in Subquery constructor.

The text states the fix: “Adding Subquery().query.subquery = True attribute fixes the problem. From my point of view, it should be set in Subquery constructor.”

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