From 688979d7d541ddb06978579b72fe1be6c013ab98 Mon Sep 17 00:00:00 2001 From: Rucha Mahabal Date: Tue, 6 Aug 2024 10:39:32 +0530 Subject: [PATCH] fix: concurrency issue leading to duplicate attendance insertion (#2041) (cherry picked from commit b4db5ac5fe305d9c1fcd822b8b61d01a87312573) --- hrms/hr/doctype/attendance/attendance.py | 1 + 1 file changed, 1 insertion(+) diff --git a/hrms/hr/doctype/attendance/attendance.py b/hrms/hr/doctype/attendance/attendance.py index f537aff92b..192c820d4f 100644 --- a/hrms/hr/doctype/attendance/attendance.py +++ b/hrms/hr/doctype/attendance/attendance.py @@ -95,6 +95,7 @@ def get_duplicate_attendance_record(self) -> str | None: & (Attendance.attendance_date == self.attendance_date) & (Attendance.name != self.name) ) + .for_update() ) if self.shift: