fix: not able to select department in instructor form

This commit is contained in:
Rohit Waghchaure 2019-11-18 15:20:15 +05:30
parent ffbfaf7099
commit 39eeac265b

View File

@ -4,11 +4,11 @@ cur_frm.add_fetch("employee", "image", "image");
frappe.ui.form.on("Instructor", {
employee: function(frm) {
if(!frm.doc.employee) return;
frappe.db.get_value('Employee', {name: frm.doc.employee}, 'company', (company) => {
frappe.db.get_value('Employee', {name: frm.doc.employee}, 'company', (d) => {
frm.set_query("department", function() {
return {
"filters": {
"company": company,
"company": d.company,
}
};
});
@ -16,7 +16,7 @@ frappe.ui.form.on("Instructor", {
frm.set_query("department", "instructor_log", function() {
return {
"filters": {
"company": company,
"company": d.company,
}
};
});