fixed bug of not sending the presignedUrl even if document exists

This commit is contained in:
ashutosh.nehete 2025-05-03 10:13:49 +05:30
parent 89a3b1e414
commit f6c135180f

View File

@ -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);