commit | 1153de196508f3c5e889737a9628b0d912844272 | [log] [tgz] |
---|---|---|
author | Khushal Trivedi <khushal.t@indictranstech.com> | Tue Feb 18 11:16:53 2020 +0530 |
committer | Khushal Trivedi <khushal.t@indictranstech.com> | Tue Feb 18 11:16:53 2020 +0530 |
tree | 6a636a8ce9b3848641774942589e9d115980c8bf | |
parent | 37eb22e50609f52570af4bbb4a66df0aed6595ad [diff] | |
parent | db002708958dc88b09b05c1d7deea16687a1b345 [diff] |
Merge branch 'develop' of https://github.com/frappe/erpnext into develop
diff --git a/erpnext/education/doctype/student_group/student_group.py b/erpnext/education/doctype/student_group/student_group.py index aa542dd..9ec9438 100644 --- a/erpnext/education/doctype/student_group/student_group.py +++ b/erpnext/education/doctype/student_group/student_group.py
@@ -26,6 +26,8 @@ frappe.throw(_("Please select Program")) def validate_strength(self): + if self.max_strength < 0: + frappe.throw(_("""Cannot enroll less than 0 students for this student group.""")) if self.max_strength and len(self.students) > self.max_strength: frappe.throw(_("""Cannot enroll more than {0} students for this student group.""").format(self.max_strength))