fix: allow creating Shift Assignment for same day (#28613)
This commit is contained in:
parent
fb14b0901c
commit
4458b24813
@ -19,8 +19,8 @@ class ShiftAssignment(Document):
|
|||||||
validate_active_employee(self.employee)
|
validate_active_employee(self.employee)
|
||||||
self.validate_overlapping_dates()
|
self.validate_overlapping_dates()
|
||||||
|
|
||||||
if self.end_date and self.end_date <= self.start_date:
|
if self.end_date:
|
||||||
frappe.throw(_("End Date must not be lesser than Start Date"))
|
self.validate_from_to_dates('start_date', 'end_date')
|
||||||
|
|
||||||
def validate_overlapping_dates(self):
|
def validate_overlapping_dates(self):
|
||||||
if not self.name:
|
if not self.name:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user