check for mandatory field before frappe.call (#8705)
diff --git a/erpnext/schools/doctype/student_group/student_group.js b/erpnext/schools/doctype/student_group/student_group.js
index c2c6912..ed94690 100644
--- a/erpnext/schools/doctype/student_group/student_group.js
+++ b/erpnext/schools/doctype/student_group/student_group.js
@@ -42,7 +42,7 @@
},
get_students: function(frm) {
- if (frm.doc.group_based_on != "Activity") {
+ if (frm.doc.group_based_on == "Batch" || frm.doc.group_based_on == "Course") {
var student_list = [];
var max_roll_no = 0;
$.each(frm.doc.students, function(i,d) {