From 74278073b32d325e41c5bdea383a3c760bb5588b Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Tue, 17 Oct 2023 20:36:01 +0200 Subject: [PATCH] Bugfix/fix query to get asset profiles matching data source and symbol (#2504) * Match dataSource and symbol * Update changelog --- CHANGELOG.md | 1 + .../symbol-profile/symbol-profile.service.ts | 20 ++++++------------- 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2c3f4dd8..33f52cbc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Displayed the transfer cash balance button based on a permission - Fixed the biometric authentication +- Fixed the query to get asset profiles that match both the `dataSource` and `symbol` values ## 2.11.0 - 2023-10-14 diff --git a/apps/api/src/services/symbol-profile/symbol-profile.service.ts b/apps/api/src/services/symbol-profile/symbol-profile.service.ts index 99244c35..b861ccf8 100644 --- a/apps/api/src/services/symbol-profile/symbol-profile.service.ts +++ b/apps/api/src/services/symbol-profile/symbol-profile.service.ts @@ -52,20 +52,12 @@ export class SymbolProfileService { SymbolProfileOverrides: true }, where: { - AND: [ - { - dataSource: { - in: aUniqueAssets.map(({ dataSource }) => { - return dataSource; - }) - }, - symbol: { - in: aUniqueAssets.map(({ symbol }) => { - return symbol; - }) - } - } - ] + OR: aUniqueAssets.map(({ dataSource, symbol }) => { + return { + dataSource, + symbol + }; + }) } }) .then((symbolProfiles) => this.getSymbols(symbolProfiles));