Browse Source

Bugfix/remove linked account from BUY / SELL / DIVIDEND activity (#7346)

* Fix removing a linked account from a buy, sell or dividend activity

* Update changelog
pull/7148/head
Thomas Kaul 4 days ago
committed by GitHub
parent
commit
22d68e7ac1
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 1
      CHANGELOG.md
  2. 12
      apps/api/src/app/activities/activities.controller.ts
  3. 4
      apps/api/src/app/activities/activities.service.ts

1
CHANGELOG.md

@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fixed an issue where the tags of an activity were lost if updating the activity failed
- Fixed an issue where the dividends, the interest and the liabilities of asset profiles without market data have been valued at zero in the portfolio calculation
- Fixed an issue where an error has been reported for asset profiles without market data which do not hold any units
- Fixed an issue with removing a linked account from a buy, sell or dividend activity
## 3.27.0 - 2026-07-15

12
apps/api/src/app/activities/activities.controller.ts

@ -315,11 +315,13 @@ export class ActivitiesController {
data: {
...data,
date,
account: {
connect: {
id_userId: { id: accountId, userId: this.request.user.id }
}
},
account: accountId
? {
connect: {
id_userId: { id: accountId, userId: this.request.user.id }
}
}
: { disconnect: true },
SymbolProfile: {
connect: {
dataSource_symbol: {

4
apps/api/src/app/activities/activities.service.ts

@ -983,10 +983,6 @@ export class ActivitiesService {
(data.SymbolProfile.connect.dataSource_symbol.dataSource === 'MANUAL' &&
data.type === 'BUY')
) {
if (data.account?.connect?.id_userId?.id === null) {
data.account = { disconnect: true };
}
delete data.SymbolProfile.connect;
delete data.SymbolProfile.update.name;
} else {

Loading…
Cancel
Save