From b64c569c09a1497a5bc5d267d0f21f264a0e0e1d Mon Sep 17 00:00:00 2001 From: adrianwium <82496337+adrianwium@users.noreply.github.com> Date: Tue, 26 Nov 2024 12:08:52 +0200 Subject: [PATCH] Opportunity_Published Notification: Exclude hidden opportunities (#1161) --- .../Opportunity/Services/OpportunityBackgroundService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/src/domain/Yoma.Core.Domain/Opportunity/Services/OpportunityBackgroundService.cs b/src/api/src/domain/Yoma.Core.Domain/Opportunity/Services/OpportunityBackgroundService.cs index 323b5be7d..75f78af19 100644 --- a/src/api/src/domain/Yoma.Core.Domain/Opportunity/Services/OpportunityBackgroundService.cs +++ b/src/api/src/domain/Yoma.Core.Domain/Opportunity/Services/OpportunityBackgroundService.cs @@ -99,7 +99,7 @@ public async Task ProcessPublishedNotifications() var organizationStatusActiveId = _organizationStatusService.GetByName(OrganizationStatus.Active.ToString()).Id; var items = _opportunityRepository.Query(true).Where(o => o.OrganizationStatusId == organizationStatusActiveId //include children / countries - && o.StatusId == statusActiveId && o.DateStart >= datetimeFrom && o.DateStart <= datetimeTo) + && o.StatusId == statusActiveId && (!o.Hidden.HasValue || o.Hidden == false) && o.DateStart >= datetimeFrom && o.DateStart <= datetimeTo) .OrderBy(o => o.DateStart).ThenBy(o => o.Title).ThenBy(o => o.Id).ToList(); if (items.Count == 0) return;