From 08541fd267ddf308581e5c863df5422b55cdab02 Mon Sep 17 00:00:00 2001 From: warren Date: Mon, 6 Jan 2025 15:23:32 +0000 Subject: [PATCH] feat: correct Id now being passed --- .../RetrieveCohortDistribution.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/application/CohortManager/src/Functions/CohortDistributionServices/RetrieveCohortDistribution/RetrieveCohortDistribution.cs b/application/CohortManager/src/Functions/CohortDistributionServices/RetrieveCohortDistribution/RetrieveCohortDistribution.cs index ece48497c..d025d7f8e 100644 --- a/application/CohortManager/src/Functions/CohortDistributionServices/RetrieveCohortDistribution/RetrieveCohortDistribution.cs +++ b/application/CohortManager/src/Functions/CohortDistributionServices/RetrieveCohortDistribution/RetrieveCohortDistribution.cs @@ -56,10 +56,11 @@ public async Task Run([HttpTrigger(AuthorizationLevel.Anonymou } else { - var nextRequest = _createCohortDistributionData.GetNextCohortRequestAudit(requestId); - if (nextRequest.Count != 0) + var nextRequestAudit = _createCohortDistributionData.GetNextCohortRequestAudit(requestId).FirstOrDefault(); + var nextRequest = nextRequestAudit?.RequestId; + if (nextRequest != null) { - cohortDistributionParticipants = _createCohortDistributionData.GetCohortDistributionParticipantsByRequestId(requestId); + cohortDistributionParticipants = _createCohortDistributionData.GetCohortDistributionParticipantsByRequestId(nextRequest); } }