diff --git a/Controllers/RecruitReportController.cs b/Controllers/RecruitReportController.cs index 040b5a5..4999e2a 100644 --- a/Controllers/RecruitReportController.cs +++ b/Controllers/RecruitReportController.cs @@ -113,6 +113,8 @@ namespace BMA.EHR.Report.Service.Controllers AuthPosition = position }) .FirstOrDefaultAsync(); + if (data == null) + return Error("ไม่พบข้อมูลในระบบ"); var rptFile = Path.Combine(_hostingEnvironment.ContentRootPath, "Report", "Recruit", $"rptCertificate{type}.trdp"); ReportPackager reportPackager = new ReportPackager();