From 615278a887fb6bbe4b192604ee6f9df5b5666ce6 Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Sun, 29 Dec 2024 19:44:14 +0100 Subject: [PATCH] Feature/improve automatic deletion of unused asset profiles (#4149) * Improve automatic deletion of unused asset profiles * Update changelog --- CHANGELOG.md | 1 + apps/api/src/app/order/order.service.ts | 5 +---- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2f8b661e1..765dcd9f9 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 support for automatic deletion of unused asset profiles when deleting activities - Improved the language localization for German (`de`) - Upgraded `husky` from version `9.1.6` to `9.1.7` diff --git a/apps/api/src/app/order/order.service.ts b/apps/api/src/app/order/order.service.ts index 129f3d8a9..e80811351 100644 --- a/apps/api/src/app/order/order.service.ts +++ b/apps/api/src/app/order/order.service.ts @@ -224,10 +224,7 @@ export class OrderService { order.symbolProfileId ]); - if ( - ['FEE', 'INTEREST', 'ITEM', 'LIABILITY'].includes(order.type) || - symbolProfile.activitiesCount === 0 - ) { + if (symbolProfile.activitiesCount === 0) { await this.symbolProfileService.deleteById(order.symbolProfileId); }