Skip to content

Commit

Permalink
fix: allow creating Shift Assignment for same day (frappe#28613) (fra…
Browse files Browse the repository at this point in the history
…ppe#28629)

(cherry picked from commit 4458b24)

Co-authored-by: Rucha Mahabal <ruchamahabal2@gmail.com>
  • Loading branch information
2 people authored and SaiFi0102 committed Mar 26, 2023
1 parent 7a1f421 commit d81a4db
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 @@ -15,8 +15,8 @@ class ShiftAssignment(Document):
def validate(self):
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 d81a4db

Please sign in to comment.