fix: sort result by creation
This commit is contained in:
parent
945084e195
commit
7cc6da2122
2 changed files with 2 additions and 2 deletions
|
|
@ -128,7 +128,7 @@ async function check_if_single(doctype) {
|
|||
async function get_first_document(doctype) {
|
||||
let docname;
|
||||
|
||||
await frappe.db.get_list(doctype).then(res => {
|
||||
await frappe.db.get_list(doctype, { order_by: "creation" }).then(res => {
|
||||
if (Array.isArray(res) && res.length)
|
||||
docname = res[0].name
|
||||
});
|
||||
|
|
|
|||
|
|
@ -571,7 +571,7 @@ export default class OnboardingWidget extends Widget {
|
|||
let docname;
|
||||
|
||||
if (message.first_document) {
|
||||
await frappe.db.get_list(doctype).then(res => {
|
||||
await frappe.db.get_list(doctype, { order_by: "creation" }).then(res => {
|
||||
if (Array.isArray(res) && res.length)
|
||||
docname = res[0].name
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue