From f6c135180fb3cb9c1a0466388fece4864325e5dd Mon Sep 17 00:00:00 2001 From: "ashutosh.nehete" Date: Sat, 3 May 2025 10:13:49 +0530 Subject: [PATCH] fixed bug of not sending the presignedUrl even if document exists --- Marco.Pms.Services/Controllers/AttendanceController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marco.Pms.Services/Controllers/AttendanceController.cs b/Marco.Pms.Services/Controllers/AttendanceController.cs index e1dda01..123971d 100644 --- a/Marco.Pms.Services/Controllers/AttendanceController.cs +++ b/Marco.Pms.Services/Controllers/AttendanceController.cs @@ -60,7 +60,7 @@ namespace MarcoBMS.Services.Controllers foreach (var attendanceLog in lstAttendance) { string objectKey = attendanceLog.Document != null ? attendanceLog.Document.S3Key : string.Empty; - string preSignedUrl = string.IsNullOrEmpty(objectKey) ? _s3Service.GeneratePreSignedUrlAsync(objectKey) : string.Empty; + string preSignedUrl = string.IsNullOrEmpty(objectKey) ? string.Empty : _s3Service.GeneratePreSignedUrlAsync(objectKey); attendanceLogVMs.Add(attendanceLog.ToAttendanceLogVMFromAttendanceLog(preSignedUrl, preSignedUrl)); } _logger.LogInfo("{count} Attendance records fetched successfully", lstAttendance.Count);