Skip to content

Commit

Permalink
fix: allow creating Shift Assignment for same day (#28613) (#28629)
Browse files Browse the repository at this point in the history
(cherry picked from commit 4458b24)

Co-authored-by: Rucha Mahabal <ruchamahabal2@gmail.com>
  • Loading branch information
mergify[bot] and ruchamahabal authored Nov 30, 2021
1 parent 16ce9df commit 9975da7
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 9975da7

Please sign in to comment.