django__django-11001
Incorrect removal of order_by clause created as multiline RawSQL
Verdict: the issue points to the file or function that was changed (Tier B).
The bug is located in SQLCompiler.get_order_by(), somewhere around line computing part of SQL query without ordering: without_ordering = self.ordering_parts.search(sql).group(1) The sql variable contains multiline sql. As a result, the self.ordering_parts regular expression is returning just a line containing ASC or DESC words.
The two checks disagreed (stated fix vs. points to it); the lower reading shown: “The bug is located in SQLCompiler.get_order_by(), somewhere around line computing part of SQL query without ordering: without_ordering = self.orderin…”
All SWE-bench Lite tasks · more django/django tasks · How the check works