From 92dcd79a84969dbe0d67f9032ac30855ef68d844 Mon Sep 17 00:00:00 2001 From: mbauskar Date: Tue, 11 Apr 2017 17:36:29 +0530 Subject: [PATCH] [minor] fixes in update_in_all_rows --- frappe/public/js/legacy/clientscriptAPI.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frappe/public/js/legacy/clientscriptAPI.js b/frappe/public/js/legacy/clientscriptAPI.js index a0a58f4af4..abca684277 100644 --- a/frappe/public/js/legacy/clientscriptAPI.js +++ b/frappe/public/js/legacy/clientscriptAPI.js @@ -489,7 +489,7 @@ _f.Frm.prototype.make_new = function(doctype) { _f.Frm.prototype.update_in_all_rows = function(table_fieldname, fieldname, value) { // update the child value in all tables where it is missing if(!value) return; - var cl = doc[table_fieldname] || []; + var cl = this.doc[table_fieldname] || []; for(var i = 0; i < cl.length; i++){ if(!cl[i][fieldname]) cl[i][fieldname] = value; }