From dae46524c4edd8bd53410673b26d2ea5a7e54364 Mon Sep 17 00:00:00 2001 From: Bogdan Date: Sun, 31 Dec 2023 09:49:17 +0200 Subject: [PATCH] Fix possible multiple enumeration in update collections --- src/Radarr.Api.V3/Collections/CollectionController.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Radarr.Api.V3/Collections/CollectionController.cs b/src/Radarr.Api.V3/Collections/CollectionController.cs index be7e4767b..defdb1c1c 100644 --- a/src/Radarr.Api.V3/Collections/CollectionController.cs +++ b/src/Radarr.Api.V3/Collections/CollectionController.cs @@ -98,7 +98,7 @@ public ActionResult UpdateCollection(CollectionResource coll [HttpPut] public ActionResult UpdateCollections(CollectionUpdateResource resource) { - var collectionsToUpdate = _collectionService.GetCollections(resource.CollectionIds); + var collectionsToUpdate = _collectionService.GetCollections(resource.CollectionIds).ToList(); foreach (var collection in collectionsToUpdate) { @@ -132,7 +132,7 @@ public ActionResult UpdateCollections(CollectionUpdateResource resource) } } - var updated = _collectionService.UpdateCollections(collectionsToUpdate.ToList()).ToResource(); + var updated = _collectionService.UpdateCollections(collectionsToUpdate).ToResource(); _commandQueueManager.Push(new RefreshCollectionsCommand());