fix: skip validation for overlapping shift attendance if no shift is linked
This commit is contained in:
parent
62cdde9a84
commit
1d4b1c42f2
@ -166,6 +166,9 @@ def get_duplicate_attendance_record(employee, attendance_date, shift, name=None)
|
||||
|
||||
|
||||
def get_overlapping_shift_attendance(employee, attendance_date, shift, name=None):
|
||||
if not shift:
|
||||
return {}
|
||||
|
||||
attendance = frappe.qb.DocType("Attendance")
|
||||
query = (
|
||||
frappe.qb.from_(attendance)
|
||||
|
@ -116,7 +116,7 @@ class TestAttendance(FrappeTestCase):
|
||||
shift_2 = setup_shift_type(shift_type="Shift 2", start_time="11:00:00", end_time="12:00:00")
|
||||
|
||||
mark_attendance(employee, date, "Present", shift_1.name)
|
||||
attendance = frappe.get_doc(
|
||||
frappe.get_doc(
|
||||
{
|
||||
"doctype": "Attendance",
|
||||
"employee": employee,
|
||||
|
Loading…
x
Reference in New Issue
Block a user