diff --git a/src/Core/Models/Data/CipherData.cs b/src/Core/Models/Data/CipherData.cs index 007f51d05..f56d82465 100644 --- a/src/Core/Models/Data/CipherData.cs +++ b/src/Core/Models/Data/CipherData.cs @@ -1,5 +1,4 @@ -using Bit.Core.Models.Api; -using Bit.Core.Models.Response; +using Bit.Core.Models.Response; using System; using System.Collections.Generic; using System.Linq; @@ -10,7 +9,7 @@ namespace Bit.Core.Models.Data { public CipherData() { } - public CipherData(CipherResponse response, string userId = null, List collectionIds = null) + public CipherData(CipherResponse response, string userId = null, HashSet collectionIds = null) { Id = response.Id; OrganizationId = response.OrganizationId; @@ -23,7 +22,7 @@ namespace Bit.Core.Models.Data Type = response.Type; Name = response.Name; Notes = response.Notes; - CollectionIds = collectionIds != null ? collectionIds : response.CollectionIds; + CollectionIds = collectionIds?.ToList() ?? response.CollectionIds; switch(Type) { diff --git a/src/Core/Models/Data/CollectionData.cs b/src/Core/Models/Data/CollectionData.cs index a63583e06..5b667d265 100644 --- a/src/Core/Models/Data/CollectionData.cs +++ b/src/Core/Models/Data/CollectionData.cs @@ -4,7 +4,7 @@ namespace Bit.Core.Models.Data { public class CollectionData : Data { - public CollectionData(CollectionResponse response) + public CollectionData(CollectionDetailsResponse response) { Id = response.Id; OrganizationId = response.OrganizationId;