mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-18 20:49:19 +00:00
refactor: usage of modified ordering (#40705)
Audited some important code: - general_ledger.py - stock_ledger.py
This commit is contained in:
@@ -47,7 +47,7 @@ def get_data():
|
||||
webform_list_contexts = frappe.get_hooks("webform_list_context")
|
||||
if webform_list_contexts:
|
||||
context = frappe._dict(frappe.get_attr(webform_list_contexts[0])("Buying") or {})
|
||||
kwargs = dict(doctype="Order Assignment", order_by="modified desc")
|
||||
kwargs = dict(doctype="Order Assignment", order_by="creation desc")
|
||||
return context.get_list(**kwargs)
|
||||
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ class TestFormLoads(FrappeTestCase):
|
||||
)
|
||||
|
||||
for doctype in doctypes:
|
||||
last_doc = frappe.db.get_value(doctype, {}, "name", order_by="modified desc")
|
||||
last_doc = frappe.db.get_value(doctype, {}, "name", order_by="creation desc")
|
||||
if not last_doc:
|
||||
continue
|
||||
with self.subTest(msg=f"Loading {doctype} - {last_doc}", doctype=doctype, last_doc=last_doc):
|
||||
|
||||
Reference in New Issue
Block a user