From 547a7b98e50021e44a0e6fb7eef9fd195f321b36 Mon Sep 17 00:00:00 2001 From: Joseph Doherty Date: Tue, 19 May 2026 06:34:32 -0400 Subject: [PATCH] fix(central-ui): load notification-list recipients sequentially to avoid concurrent DbContext use --- .../Pages/Notifications/NotificationLists.razor | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/ScadaLink.CentralUI/Components/Pages/Notifications/NotificationLists.razor b/src/ScadaLink.CentralUI/Components/Pages/Notifications/NotificationLists.razor index d97d3aa..9722c06 100644 --- a/src/ScadaLink.CentralUI/Components/Pages/Notifications/NotificationLists.razor +++ b/src/ScadaLink.CentralUI/Components/Pages/Notifications/NotificationLists.razor @@ -104,13 +104,9 @@ { _lists = (await NotificationRepository.GetAllNotificationListsAsync()).ToList(); _recipients.Clear(); - var recipientTasks = _lists.ToDictionary( - list => list.Id, - list => NotificationRepository.GetRecipientsByListIdAsync(list.Id)); - await Task.WhenAll(recipientTasks.Values); - foreach (var (id, task) in recipientTasks) + foreach (var list in _lists) { - _recipients[id] = task.Result; + _recipients[list.Id] = await NotificationRepository.GetRecipientsByListIdAsync(list.Id); } } catch (Exception ex)