From 1915a608348d89f8dac040a8c81832fb502723dc Mon Sep 17 00:00:00 2001 From: Rucha Mahabal Date: Thu, 10 Sep 2020 12:13:58 +0530 Subject: [PATCH] fix: education settings check --- erpnext/education/doctype/student/student.js | 2 +- .../education/doctype/student_applicant/student_applicant.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/education/doctype/student/student.js b/erpnext/education/doctype/student/student.js index 5b05bc4f9a..fd23ae41ef 100644 --- a/erpnext/education/doctype/student/student.js +++ b/erpnext/education/doctype/student/student.js @@ -27,7 +27,7 @@ frappe.ui.form.on('Student', { } frappe.db.get_value('Education Settings', {name: 'Education Settings'}, 'user_creation_skip', (r) => { - if (r.user_creation_skip === "0") { + if (cint(r.user_creation_skip) !== 1) { frm.set_df_property('student_email_id', 'reqd', 1); } }); diff --git a/erpnext/education/doctype/student_applicant/student_applicant.js b/erpnext/education/doctype/student_applicant/student_applicant.js index 27b3377267..b4cfdf16e0 100644 --- a/erpnext/education/doctype/student_applicant/student_applicant.js +++ b/erpnext/education/doctype/student_applicant/student_applicant.js @@ -39,7 +39,7 @@ frappe.ui.form.on("Student Applicant", { }); frappe.db.get_value("Education Settings", {name: "Education Settings"}, "user_creation_skip", (r) => { - if (r.user_creation_skip === "0") { + if (cint(r.user_creation_skip) !== 1) { frm.set_df_property("student_email_id", "reqd", 1); } });