Przeglądaj źródła

refactor: use frappe.model.has_value to determine if field is empty

version-14
barredterra 3 lat temu
rodzic
commit
118d928628
1 zmienionych plików z 1 dodań i 1 usunięć
  1. +1
    -1
      frappe/public/js/frappe/form/form.js

+ 1
- 1
frappe/public/js/frappe/form/form.js Wyświetl plik

@@ -1708,7 +1708,7 @@ frappe.ui.form.Form = class FrappeForm {


frappe.model frappe.model
.get_children(this.doc, table_fieldname) .get_children(this.doc, table_fieldname)
.filter(child => !child[fieldname])
.filter(child => !frappe.model.has_value(child.doctype, child.name, fieldname))
.forEach(child => .forEach(child =>
frappe.model.set_value(child.doctype, child.name, fieldname, value) frappe.model.set_value(child.doctype, child.name, fieldname, value)
); );


Ładowanie…
Anuluj
Zapisz