From 4c24fb1efc6a2e3111f8a7d7e03fa1717dc73aa8 Mon Sep 17 00:00:00 2001 From: Khushal Trivedi Date: Wed, 11 Dec 2019 15:16:56 +0530 Subject: [PATCH] fix:Sibling child table filtering for duplacacy on student form --- erpnext/education/doctype/student/student.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/erpnext/education/doctype/student/student.js b/erpnext/education/doctype/student/student.js index 66df6b977e..ea01b5ded2 100644 --- a/erpnext/education/doctype/student/student.js +++ b/erpnext/education/doctype/student/student.js @@ -33,7 +33,6 @@ frappe.ui.form.on('Student Guardian', { frm.fields_dict['guardians'].grid.get_field('guardian').get_query = function(doc){ let guardian_list = []; if(!doc.__islocal) guardian_list.push(doc.guardian); - $.each(doc.guardians, function(idx, val){ if (val.guardian) guardian_list.push(val.guardian); }); @@ -48,12 +47,10 @@ frappe.ui.form.on('Student Sibling', { frm.fields_dict['siblings'].grid.get_field('student').get_query = function(doc){ let sibling_list = [frm.doc.name]; if(!doc.__islocal) sibling_list.push(doc.student); - $.each(doc.siblings, function(idx, val){ if (val.student && val.studying_in_same_institute == 'YES') { sibling_list.push(val.student); - } - + } }); return { filters: [['Student', 'name', 'not in', sibling_list]] }; };