fix: Travis (#20688)
* fix: Travis * fix: Update test records Co-authored-by: Chinmay Pai <chinmaydpai@gmail.com>
This commit is contained in:
parent
d52354f131
commit
6e53afd947
@ -26,8 +26,8 @@ class StudentGroup(Document):
|
|||||||
frappe.throw(_("Please select Program"))
|
frappe.throw(_("Please select Program"))
|
||||||
|
|
||||||
def validate_strength(self):
|
def validate_strength(self):
|
||||||
if self.max_strength <= 0:
|
if cint(self.max_strength) < 0:
|
||||||
frappe.throw(_("""Max strength must be greater than zero."""))
|
frappe.throw(_("""Max strength cannot be less than zero."""))
|
||||||
if self.max_strength and len(self.students) > self.max_strength:
|
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))
|
frappe.throw(_("""Cannot enroll more than {0} students for this student group.""").format(self.max_strength))
|
||||||
|
|
||||||
|
|||||||
@ -5,26 +5,30 @@
|
|||||||
"program": "_TP1",
|
"program": "_TP1",
|
||||||
"batch": "_Batch 1",
|
"batch": "_Batch 1",
|
||||||
"academic_year": "2014-2015",
|
"academic_year": "2014-2015",
|
||||||
"academic_term": "2014-2015 (_Test Academic Term)"
|
"academic_term": "2014-2015 (_Test Academic Term)",
|
||||||
|
"max_strength": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"student_group_name": "Course-TC101-2014-2015 (_Test Academic Term)",
|
"student_group_name": "Course-TC101-2014-2015 (_Test Academic Term)",
|
||||||
"group_based_on": "Course",
|
"group_based_on": "Course",
|
||||||
"course": "TC101",
|
"course": "TC101",
|
||||||
"academic_year": "2014-2015",
|
"academic_year": "2014-2015",
|
||||||
"academic_term": "2014-2015 (_Test Academic Term)"
|
"academic_term": "2014-2015 (_Test Academic Term)",
|
||||||
|
"max_strength": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"student_group_name": "Course-TC102-2014-2015 (_Test Academic Term)",
|
"student_group_name": "Course-TC102-2014-2015 (_Test Academic Term)",
|
||||||
"group_based_on": "Course",
|
"group_based_on": "Course",
|
||||||
"course": "TC102",
|
"course": "TC102",
|
||||||
"academic_year": "2014-2015",
|
"academic_year": "2014-2015",
|
||||||
"academic_term": "2014-2015 (_Test Academic Term)"
|
"academic_term": "2014-2015 (_Test Academic Term)",
|
||||||
|
"max_strength": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"student_group_name": "Activity-2014-2015 (_Test Academic Term)",
|
"student_group_name": "Activity-2014-2015 (_Test Academic Term)",
|
||||||
"group_based_on": "Activity",
|
"group_based_on": "Activity",
|
||||||
"academic_year": "2014-2015",
|
"academic_year": "2014-2015",
|
||||||
"academic_term": "2014-2015 (_Test Academic Term)"
|
"academic_term": "2014-2015 (_Test Academic Term)",
|
||||||
|
"max_strength": 0
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
Loading…
x
Reference in New Issue
Block a user