From 34f41b046cf0244ec6ae81d6c1a963faaf4ac62d Mon Sep 17 00:00:00 2001 From: Jonathan Idland Olsnes <73334350+Jonathanio123@users.noreply.github.com> Date: Wed, 11 Sep 2024 09:49:38 +0200 Subject: [PATCH] Fixed wrong "where" filter --- .../Functions/WeeklyDepartmentSummarySender.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Fusion.Summary.Functions/Functions/WeeklyDepartmentSummarySender.cs b/src/Fusion.Summary.Functions/Functions/WeeklyDepartmentSummarySender.cs index 4ccfe69ee..7e78090fb 100644 --- a/src/Fusion.Summary.Functions/Functions/WeeklyDepartmentSummarySender.cs +++ b/src/Fusion.Summary.Functions/Functions/WeeklyDepartmentSummarySender.cs @@ -45,9 +45,7 @@ public async Task RunAsync([TimerTrigger("0 0 5 * * MON", RunOnStartup = false)] var departments = await summaryApiClient.GetDepartmentsAsync(); if (_departmentFilter.Length != 0) - { - departments = departments?.Where(d => _departmentFilter.Contains(d.DepartmentSapId)).ToArray(); - } + departments = departments?.Where(d => _departmentFilter.Any(df => d.FullDepartmentName!.Contains(df))).ToArray(); if (departments is null || departments.Count == 0) {