Browse Source

Merge branch 'main' into fix-noname-crash

pull/4355/head
Thomas Kaul 2 months ago
committed by GitHub
parent
commit
e4e6ccb446
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 4
      CHANGELOG.md
  2. 5
      apps/api/src/services/data-provider/data-enhancer/trackinsight/trackinsight.service.ts

4
CHANGELOG.md

@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## Unreleased ## Unreleased
### Changed
- Improved the symbol lookup in the _Trackinsight_ data enhancer for asset profile data
### Fixed ### Fixed
- Handled an exception in the benchmark service related to unnamed asset profiles - Handled an exception in the benchmark service related to unnamed asset profiles

5
apps/api/src/services/data-provider/data-enhancer/trackinsight/trackinsight.service.ts

@ -192,7 +192,10 @@ export class TrackinsightDataEnhancerService implements DataEnhancerInterface {
.then((jsonRes) => { .then((jsonRes) => {
if ( if (
jsonRes['results']?.['count'] === 1 || jsonRes['results']?.['count'] === 1 ||
jsonRes['results']?.['docs']?.[0]?.['ticker'] === symbol // Allow exact match
jsonRes['results']?.['docs']?.[0]?.['ticker'] === symbol ||
// Allow EXCHANGE:SYMBOL
jsonRes['results']?.['docs']?.[0]?.['ticker']?.endsWith(`:${symbol}`)
) { ) {
return jsonRes['results']['docs'][0]['ticker']; return jsonRes['results']['docs'][0]['ticker'];
} }

Loading…
Cancel
Save