Skip to content

Commit

Permalink
Fixed wrong "where" filter
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathanio123 committed Sep 11, 2024
1 parent 6c9e1d5 commit 34f41b0
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down

0 comments on commit 34f41b0

Please sign in to comment.