fix: Validation condition

This commit is contained in:
Deepesh Garg
2020-02-23 20:59:05 +05:30
committed by GitHub
parent 68fa65edd1
commit aaea4e60b6

View File

@@ -23,7 +23,7 @@ class Student(Document):
def validate_dates(self):
for sibling in self.siblings:
if sibling.date_of_birth and getdate(sibling.date_of_birth) >= getdate():
if sibling.date_of_birth and getdate(sibling.date_of_birth) > getdate():
frappe.throw(_("Row {0}:Sibling Date of Birth cannot be greater than today.").format(sibling.idx))
if self.date_of_birth and getdate(self.date_of_birth) >= getdate(today()):