copy org id too

This commit is contained in:
Kyle Spearrin 2018-11-05 14:48:07 -05:00
parent 4a13e62477
commit 6fa3538cbc
1 changed files with 4 additions and 3 deletions

View File

@ -103,10 +103,11 @@ export class CollectionService implements CollectionServiceAbstraction {
collections = await this.getAllDecrypted(); collections = await this.getAllDecrypted();
} }
const nodes: Array<TreeNode<CollectionView>> = []; const nodes: Array<TreeNode<CollectionView>> = [];
collections.forEach((f) => { collections.forEach((c) => {
const collectionCopy = new CollectionView(); const collectionCopy = new CollectionView();
collectionCopy.id = f.id; collectionCopy.id = c.id;
ServiceUtils.nestedTraverse(nodes, 0, f.name.split(NestingDelimiter), collectionCopy, collectionCopy.organizationId = c.organizationId;
ServiceUtils.nestedTraverse(nodes, 0, c.name.split(NestingDelimiter), collectionCopy,
null, NestingDelimiter); null, NestingDelimiter);
}); });
return nodes; return nodes;