Browse Source

Feature: refactor symbol profile retrieval for manual data source handling

pull/6975/head
AyushMishraa 6 days ago
parent
commit
2a88340cc8
  1. 11
      apps/api/src/app/admin/admin.service.ts

11
apps/api/src/app/admin/admin.service.ts

@ -613,13 +613,16 @@ export class AdminService {
// Check if we need to delete SymbolProfileOverrides when converting to MANUAL
let deleteOverrides = false;
if (finalDataSource === 'MANUAL') {
const [renamedProfile] =
await this.symbolProfileService.getSymbolProfiles([
{
const renamedProfile =
await this.prismaService.symbolProfile.findFirst({
where: {
dataSource: finalDataSource,
symbol: newSymbol as string
},
select: {
SymbolProfileOverrides: true
}
]);
});
deleteOverrides = !!renamedProfile?.SymbolProfileOverrides;
}

Loading…
Cancel
Save