Skip to content

Open Source Wealth Management Software. Angular + NestJS + Prisma + Nx + TypeScript 🤍

Feature/improve import validation (#2305)

Thomas Kaulc6aa06b9333e
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 03535ce7fe..0830651195 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
+- Improved the validation in the activities import
- Refreshed the cryptocurrencies list
## 1.305.0 - 2023-09-03
diff --git a/apps/api/src/app/import/import.service.ts b/apps/api/src/app/import/import.service.ts
index 026f3610eb..da0e4806c2 100644
--- a/apps/api/src/app/import/import.service.ts
+++ b/apps/api/src/app/import/import.service.ts
@@ -566,7 +566,7 @@ export class ImportService {
])
)?.[symbol];
- if (!assetProfile) {
+ if (!assetProfile?.name) {
throw new Error(
`activities.${index}.symbol ("${symbol}") is not valid for the specified data source ("${dataSource}")`
);