fix: custom script to duplicate row not working in v13 (#13667)

(cherry picked from commit 1615baf69a476a4c8361cd8af19e2edada6b4784)
This commit is contained in:
rohitwaghchaure 2021-07-12 17:43:15 +05:30 committed by mergify-bot
parent d8c4ad379c
commit 10fde05950

View file

@ -1265,7 +1265,9 @@ frappe.ui.form.Form = class FrappeForm {
if (df && df[property] != value) {
df[property] = value;
if (table_field && table_row_name) {
this.fields_dict[fieldname].grid.grid_rows_by_docname[table_row_name].refresh_field(fieldname);
if (this.fields_dict[fieldname].grid.grid_rows_by_docname[table_row_name]) {
this.fields_dict[fieldname].grid.grid_rows_by_docname[table_row_name].refresh_field(fieldname);
}
} else {
this.refresh_field(fieldname);
}