Browse Source

Make order of X-ray rules consistent

pull/134/head
Thomas 4 years ago
parent
commit
96ca5ee197
  1. 14
      apps/api/src/app/portfolio/portfolio.controller.ts
  2. 4
      apps/api/src/models/portfolio.ts

14
apps/api/src/app/portfolio/portfolio.controller.ts

@ -315,18 +315,6 @@ export class PortfolioController {
impersonationUserId || this.request.user.id
);
let report = await portfolio.getReport();
if (
impersonationId &&
!hasPermission(
getPermissions(this.request.user.role),
permissions.readForeignPortfolio
)
) {
// TODO: Filter out absolute numbers
}
return report;
return await portfolio.getReport();
}
}

4
apps/api/src/models/portfolio.ts

@ -402,10 +402,10 @@ export class Portfolio implements PortfolioInterface {
accountClusterRisk: await this.rulesService.evaluate(
this,
[
new AccountClusterRiskCurrentInvestment(
new AccountClusterRiskInitialInvestment(
this.exchangeRateDataService
),
new AccountClusterRiskInitialInvestment(
new AccountClusterRiskCurrentInvestment(
this.exchangeRateDataService
),
new AccountClusterRiskSingleAccount(this.exchangeRateDataService)

Loading…
Cancel
Save