From 4c189fdc4a5b08c797566ab117c35afd68107f7b Mon Sep 17 00:00:00 2001 From: Suphonchai Phoonsawat Date: Thu, 29 Jan 2026 10:07:29 +0700 Subject: [PATCH] Fix null reference for CheckIn and CheckOut location names in LeaveController --- BMA.EHR.Leave/Controllers/LeaveController.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BMA.EHR.Leave/Controllers/LeaveController.cs b/BMA.EHR.Leave/Controllers/LeaveController.cs index 9d7c4581..56e79f48 100644 --- a/BMA.EHR.Leave/Controllers/LeaveController.cs +++ b/BMA.EHR.Leave/Controllers/LeaveController.cs @@ -1462,7 +1462,7 @@ namespace BMA.EHR.Leave.Service.Controllers "LATE" : "NORMAL", CheckInIsLocation = d.IsLocationCheckIn, - CheckInLocationName = d.CheckInLocationName, + CheckInLocationName = d.CheckInLocationName ?? "", CheckOutDate = d.CheckOut == null ? null : d.CheckOut.Value.Date, CheckOutTime = d.CheckOut == null ? "" : d.CheckOut.Value.ToString("HH:mm:ss"), CheckOutLocation = d.CheckOutPOI ?? "", @@ -1477,7 +1477,7 @@ namespace BMA.EHR.Leave.Service.Controllers "NORMAL", CheckOutIsLocation = d.IsLocationCheckOut, - CheckOutLocationName = d.CheckOutLocationName, + CheckOutLocationName = d.CheckOutLocationName ?? "", IsEdit = _processUserTimeStampRepository.IsEditRequest(userId, d.CheckIn.Date)