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