From 037a151ef58a19318ed0e1eb3f14acb05f44db02 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Thu, 22 Nov 2018 12:54:51 +0530 Subject: [PATCH] [Fix] New holiday list form is not working --- erpnext/hr/doctype/holiday_list/holiday_list.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/erpnext/hr/doctype/holiday_list/holiday_list.js b/erpnext/hr/doctype/holiday_list/holiday_list.js index b4c56da649..462bd8bb67 100644 --- a/erpnext/hr/doctype/holiday_list/holiday_list.js +++ b/erpnext/hr/doctype/holiday_list/holiday_list.js @@ -3,7 +3,9 @@ frappe.ui.form.on('Holiday List', { refresh: function(frm) { - frm.set_value('total_holidays', frm.doc.holidays.length); + if (frm.doc.holidays) { + frm.set_value('total_holidays', frm.doc.holidays.length); + } }, from_date: function(frm) { if (frm.doc.from_date && !frm.doc.to_date) {