mirror of
https://github.com/Radarr/Radarr
synced 2026-01-04 06:37:51 +01:00
Fix possible multiple enumeration in update collections
This commit is contained in:
parent
3c6386f318
commit
dae46524c4
1 changed files with 2 additions and 2 deletions
|
|
@ -98,7 +98,7 @@ public ActionResult<CollectionResource> 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());
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue