From 315c4ffc76c5a6a86b2a2ac81fe2c4f6495d5fea Mon Sep 17 00:00:00 2001 From: Andreas Coroiu Date: Fri, 21 Apr 2023 10:30:30 +0200 Subject: [PATCH] [AC-1338] fix: filter out unassigned from cipher create/edit/clone (#5238) --- apps/web/src/app/vault/org-vault/vault.component.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/web/src/app/vault/org-vault/vault.component.ts b/apps/web/src/app/vault/org-vault/vault.component.ts index 3e92226798..0f842c621e 100644 --- a/apps/web/src/app/vault/org-vault/vault.component.ts +++ b/apps/web/src/app/vault/org-vault/vault.component.ts @@ -558,7 +558,7 @@ export class VaultComponent implements OnInit, OnDestroy { this.collectionsModalRef, (comp) => { comp.collectionIds = cipher.collectionIds; - comp.collections = currCollections.filter((c) => !c.readOnly && c.id != null); + comp.collections = currCollections.filter((c) => !c.readOnly && c.id != Unassigned); comp.organization = this.organization; comp.cipherId = cipher.id; comp.onSavedCollections.pipe(takeUntil(this.destroy$)).subscribe(() => { @@ -571,7 +571,7 @@ export class VaultComponent implements OnInit, OnDestroy { async addCipher() { const collections = (await firstValueFrom(this.vaultFilterService.filteredCollections$)).filter( - (c) => !c.readOnly && c.id != null + (c) => !c.readOnly && c.id != Unassigned ); await this.editCipher(null, (comp) => { @@ -644,7 +644,7 @@ export class VaultComponent implements OnInit, OnDestroy { async cloneCipher(cipher: CipherView) { const collections = (await firstValueFrom(this.vaultFilterService.filteredCollections$)).filter( - (c) => !c.readOnly && c.id != null + (c) => !c.readOnly && c.id != Unassigned ); await this.editCipher(cipher, (comp) => {