|
@ -212,14 +212,14 @@ export class BenchmarkService { |
|
|
dataSource, |
|
|
dataSource, |
|
|
symbol |
|
|
symbol |
|
|
}: UniqueAsset): Promise<Partial<SymbolProfile>> { |
|
|
}: UniqueAsset): Promise<Partial<SymbolProfile>> { |
|
|
const symbolProfile = await this.prismaService.symbolProfile.findFirst({ |
|
|
const assetProfile = await this.prismaService.symbolProfile.findFirst({ |
|
|
where: { |
|
|
where: { |
|
|
dataSource, |
|
|
dataSource, |
|
|
symbol |
|
|
symbol |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
if (!symbolProfile) { |
|
|
if (!assetProfile) { |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -228,7 +228,7 @@ export class BenchmarkService { |
|
|
PROPERTY_BENCHMARKS |
|
|
PROPERTY_BENCHMARKS |
|
|
)) as BenchmarkProperty[]) ?? []; |
|
|
)) as BenchmarkProperty[]) ?? []; |
|
|
|
|
|
|
|
|
benchmarks.push({ symbolProfileId: symbolProfile.id }); |
|
|
benchmarks.push({ symbolProfileId: assetProfile.id }); |
|
|
|
|
|
|
|
|
benchmarks = uniqBy(benchmarks, 'symbolProfileId'); |
|
|
benchmarks = uniqBy(benchmarks, 'symbolProfileId'); |
|
|
|
|
|
|
|
@ -240,8 +240,8 @@ export class BenchmarkService { |
|
|
return { |
|
|
return { |
|
|
dataSource, |
|
|
dataSource, |
|
|
symbol, |
|
|
symbol, |
|
|
id: symbolProfile.id, |
|
|
id: assetProfile.id, |
|
|
name: symbolProfile.name |
|
|
name: assetProfile.name |
|
|
}; |
|
|
}; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|