File tree Expand file tree Collapse file tree
apps/api/src/instrument-records Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -132,10 +132,10 @@ export class InstrumentRecordsService {
132132 async exportRecords ( { groupId } : { groupId ?: string } = { } , { ability } : Required < EntityOperationOptions > ) {
133133 const records = await this . queryRecordsRaw ( ability , groupId ) ;
134134
135- const instrumentIds = [ ... new Set ( records . map ( ( r ) => r . instrumentId ) ) ] ;
135+ const instrumentIds = new Set ( records . map ( ( r ) => r . instrumentId ) ) ;
136136
137137 const instrumentsArray = await Promise . all (
138- instrumentIds . map ( ( id ) => this . instrumentsService . findById ( id ) as Promise < ScalarInstrument > )
138+ instrumentIds . values ( ) . map ( ( id ) => this . instrumentsService . findById ( id ) as Promise < ScalarInstrument > )
139139 ) ;
140140
141141 const instruments = new Map ( instrumentsArray . map ( ( instrument ) => [ instrument . id , instrument ] ) ) ;
You can’t perform that action at this time.
0 commit comments