Skip to content

Commit

Permalink
perf: remove useless sorting on docstatus (#25571)
Browse files Browse the repository at this point in the history
  • Loading branch information
ankush committed Mar 21, 2024
1 parent 695d822 commit a12fc11
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions frappe/model/db_query.py
Original file line number Diff line number Diff line change
Expand Up @@ -1089,11 +1089,6 @@ def set_order_by(self, args):
f"`tab{self.doctype}`.`{sort_field or 'modified'}` {sort_order or 'desc'}"
)

# draft docs always on top
if hasattr(self.doctype_meta, "is_submittable") and self.doctype_meta.is_submittable:
if self.order_by:
args.order_by = f"`tab{self.doctype}`.docstatus asc, {args.order_by}"

def validate_order_by_and_group_by(self, parameters: str):
"""Check order by, group by so that atleast one column is selected and does not have subquery"""
if not parameters:
Expand Down

0 comments on commit a12fc11

Please sign in to comment.