diff --git a/apps/api/src/app/import/import.service.ts b/apps/api/src/app/import/import.service.ts index d15e8d437..d564f497b 100644 --- a/apps/api/src/app/import/import.service.ts +++ b/apps/api/src/app/import/import.service.ts @@ -583,34 +583,32 @@ export class ImportService { ); } - if (dataSource !== 'MANUAL') { - const assetProfile = ( - await this.dataProviderService.getAssetProfiles([ - { dataSource, symbol } - ]) - )?.[symbol]; - - if (!assetProfile?.name) { - throw new Error( - `activities.${index}.symbol ("${symbol}") is not valid for the specified data source ("${dataSource}")` - ); - } + const assetProfile = ( + await this.dataProviderService.getAssetProfiles([ + { dataSource, symbol } + ]) + )?.[symbol]; - if ( - assetProfile.currency !== currency && - !this.exchangeRateDataService.hasCurrencyPair( - currency, - assetProfile.currency - ) - ) { - throw new Error( - `activities.${index}.currency ("${currency}") does not match with "${assetProfile.currency}" and no exchange rate is available from "${currency}" to "${assetProfile.currency}"` - ); - } + if (!assetProfile?.name) { + throw new Error( + `activities.${index}.symbol ("${symbol}") is not valid for the specified data source ("${dataSource}")` + ); + } - assetProfiles[getAssetProfileIdentifier({ dataSource, symbol })] = - assetProfile; + if ( + assetProfile.currency !== currency && + !this.exchangeRateDataService.hasCurrencyPair( + currency, + assetProfile.currency + ) + ) { + throw new Error( + `activities.${index}.currency ("${currency}") does not match with "${assetProfile.currency}" and no exchange rate is available from "${currency}" to "${assetProfile.currency}"` + ); } + + assetProfiles[getAssetProfileIdentifier({ dataSource, symbol })] = + assetProfile; } return assetProfiles;