Skip to content

Commit

Permalink
fix: allow creating Shift Assignment for same day (frappe#28613)
Browse files Browse the repository at this point in the history
  • Loading branch information
ruchamahabal authored Nov 30, 2021
1 parent fb14b09 commit 4458b24
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions erpnext/hr/doctype/shift_assignment/shift_assignment.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ def validate(self):
validate_active_employee(self.employee)
self.validate_overlapping_dates()

if self.end_date and self.end_date <= self.start_date:
frappe.throw(_("End Date must not be lesser than Start Date"))
if self.end_date:
self.validate_from_to_dates('start_date', 'end_date')

def validate_overlapping_dates(self):
if not self.name:
Expand Down

0 comments on commit 4458b24

Please sign in to comment.