Skip to content

Commit

Permalink
fix(Attendance): overlapping shift attendance
Browse files Browse the repository at this point in the history
(cherry picked from commit 0ea2d12)
  • Loading branch information
krantheman authored and mergify[bot] committed Jul 17, 2024
1 parent af7ea73 commit 8bef18c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions hrms/hr/doctype/attendance/attendance.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,10 @@ def get_overlapping_shift_attendance(self) -> dict:
)
).run(as_dict=True)

if same_date_attendance and has_overlapping_timings(self.shift, same_date_attendance[0].shift):
return same_date_attendance[0]
for d in same_date_attendance:
if has_overlapping_timings(self.shift, d.shift):
return d

return {}

def validate_employee_status(self):
Expand Down

0 comments on commit 8bef18c

Please sign in to comment.