Merge pull request #16055 from rohitwaghchaure/fixed_holiday_list_not_working

[Fix] New holiday list form is not working
This commit is contained in:
Nabin Hait 2018-11-26 19:44:19 +05:30 committed by GitHub
commit 70642a0ae4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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) {