Skip to content

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

Bugfix/fix duplicated tags in position detail dialog (#3224)

Thomas Kaulb8533050b0c6
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 7a0b550600..7da7e2f939 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -17,6 +17,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Improved the usability of the date range support by specific years (`2023`, `2022`, `2021`, etc.) in the assistant (experimental)
- Introduced a factory for the portfolio calculations to support different algorithms in future
+### Fixed
+
+- Fixed the duplicated tags in the position detail dialog
+
## 2.69.0 - 2024-03-30
### Added
diff --git a/apps/api/src/app/portfolio/portfolio.service.ts b/apps/api/src/app/portfolio/portfolio.service.ts
index 566ad4049b..0bdafec485 100644
--- a/apps/api/src/app/portfolio/portfolio.service.ts
+++ b/apps/api/src/app/portfolio/portfolio.service.ts
@@ -719,8 +719,6 @@ export class PortfolioService {
{ dataSource: aDataSource, symbol: aSymbol }
]);
- tags = uniqBy(tags, 'id');
-
const portfolioCalculator = this.calculatorFactory.createCalculator({
activities: orders.filter((order) => {
tags = tags.concat(order.tags);
@@ -731,6 +729,8 @@ export class PortfolioService {
currency: userCurrency
});
+ tags = uniqBy(tags, 'id');
+
const portfolioStart = portfolioCalculator.getStartDate();
const transactionPoints = portfolioCalculator.getTransactionPoints();