From e46c8e1ee97ac7d48ab0974f539e3d4e75835fba Mon Sep 17 00:00:00 2001 From: Thomas <4159106+dtslvr@users.noreply.github.com> Date: Thu, 10 Feb 2022 10:56:57 +0100 Subject: [PATCH] Fix creation of wealth items --- .../create-or-update-transaction-dialog.component.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/apps/client/src/app/pages/portfolio/transactions/create-or-update-transaction-dialog/create-or-update-transaction-dialog.component.ts b/apps/client/src/app/pages/portfolio/transactions/create-or-update-transaction-dialog/create-or-update-transaction-dialog.component.ts index 05c02bcb4..40c38bb95 100644 --- a/apps/client/src/app/pages/portfolio/transactions/create-or-update-transaction-dialog/create-or-update-transaction-dialog.component.ts +++ b/apps/client/src/app/pages/portfolio/transactions/create-or-update-transaction-dialog/create-or-update-transaction-dialog.component.ts @@ -216,9 +216,11 @@ export class CreateOrUpdateTransactionDialog implements OnDestroy { dataSource: this.activityForm.controls['dataSource'].value, fee: this.activityForm.controls['fee'].value, quantity: this.activityForm.controls['quantity'].value, - symbol: isUUID(this.activityForm.controls['searchSymbol'].value.symbol) - ? this.activityForm.controls['name'].value - : this.activityForm.controls['searchSymbol'].value.symbol, + symbol: + this.activityForm.controls['searchSymbol'].value.symbol === undefined || + isUUID(this.activityForm.controls['searchSymbol'].value.symbol) + ? this.activityForm.controls['name'].value + : this.activityForm.controls['searchSymbol'].value.symbol, type: this.activityForm.controls['type'].value, unitPrice: this.activityForm.controls['unitPrice'].value };