refactor: use db independent offset syntax (#31345)

* chore: use db independent offset syntax

* fix: typo

* style: reformat code to black spec

Co-authored-by: Ankush Menat <ankush@frappe.io>
This commit is contained in:
Conor
2022-06-14 00:19:07 -05:00
committed by GitHub
parent 39338e70d5
commit 00ef499739
19 changed files with 40 additions and 37 deletions

View File

@@ -102,7 +102,7 @@ def get_work_orders(doctype, txt, searchfield, start, page_len, filters):
return frappe.db.sql(
"""select name from `tabWork Order`
where name like %(name)s and {0} and produced_qty > qty and docstatus = 1
order by name limit {1}, {2}""".format(
order by name limit {2} offset {1}""".format(
cond, start, page_len
),
{"name": "%%%s%%" % txt},