fix: Validation message
This commit is contained in:
parent
8773dc3ffe
commit
a0021969ad
@ -27,7 +27,7 @@ class StudentGroup(Document):
|
|||||||
|
|
||||||
def validate_strength(self):
|
def validate_strength(self):
|
||||||
if self.max_strength <= 0:
|
if self.max_strength <= 0:
|
||||||
frappe.throw(_("""Cannot enroll less than or equal to 0 students for this student group."""))
|
frappe.throw(_("""Max strength must be greater 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))
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user