From 0223ff5d9b08cc90174699198f18e8a87aec1976 Mon Sep 17 00:00:00 2001 From: AdisakKanthawilang Date: Tue, 29 Jul 2025 11:54:35 +0700 Subject: [PATCH] #1693 --- .../Controllers/InsigniaRequestController.cs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/BMA.EHR.Insignia/Controllers/InsigniaRequestController.cs b/BMA.EHR.Insignia/Controllers/InsigniaRequestController.cs index edff00d4..7c8dc329 100644 --- a/BMA.EHR.Insignia/Controllers/InsigniaRequestController.cs +++ b/BMA.EHR.Insignia/Controllers/InsigniaRequestController.cs @@ -336,8 +336,14 @@ namespace BMA.EHR.Insignia.Service.Controllers //} if (role.Trim().ToLower() == "officer") { - resend.Items = (await _repository.InsigniaHasProfile(result.PeriodId, ocId, status, type)) - .Where(x => x.ProfileType!.ToLower() == type.ToLower()).ToList(); + /* resend.Items = (await _repository.InsigniaHasProfile(result.PeriodId, ocId, status, type)) + .Where(x => x.ProfileType!.ToLower() == type.ToLower()).ToList();*/ + var items = await _repository.InsigniaHasProfile(result.PeriodId, ocId, status, type); + + resend.Items = (items ?? new List()) + .Where(x => x != null && !string.IsNullOrEmpty(x.ProfileType) && x.ProfileType.ToLower() == type.ToLower()) + .ToList(); + return Success(resend); } else