Browse Source

Handle exception for cash positions

pull/7391/head
Thomas Kaul 1 month ago
parent
commit
3c88aa26f1
  1. 16
      apps/api/src/app/portfolio/portfolio.service.ts

16
apps/api/src/app/portfolio/portfolio.service.ts

@ -783,10 +783,24 @@ export class PortfolioService {
return undefined;
}
const [SymbolProfile] = await this.symbolProfileService.getSymbolProfiles([
const [symbolProfile] = await this.symbolProfileService.getSymbolProfiles([
{ dataSource, symbol }
]);
const SymbolProfile =
symbolProfile ??
({
dataSource,
symbol,
assetClass: AssetClass.LIQUIDITY,
assetSubClass: AssetSubClass.CASH,
countries: [],
currency: symbol,
holdings: [],
name: symbol,
sectors: []
} as EnhancedSymbolProfile);
const portfolioCalculator = this.calculatorFactory.createCalculator({
activities,
userId,

Loading…
Cancel
Save