Skip to content

Commit dca4804

Browse files
committed
feat: use createMany from subject service instead of createSubjectIfNotFound
1 parent 975c72d commit dca4804

1 file changed

Lines changed: 1 addition & 7 deletions

File tree

apps/api/src/instrument-records/instrument-records.service.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -284,10 +284,7 @@ export class InstrumentRecordsService {
284284
return subjectToAdd;
285285
});
286286

287-
// await this.subjectsService.createMany({
288-
// data: subjectIdList,
289-
// skipDuplicates: true
290-
// });
287+
await this.subjectsService.createMany(subjectIdList);
291288

292289
const preProcessedRecords = await Promise.all(
293290
records.map(async (record) => {
@@ -302,9 +299,6 @@ export class InstrumentRecordsService {
302299
);
303300
}
304301

305-
// Ensure subject exists
306-
await this.createSubjectIfNotFound(subjectId);
307-
308302
const session = await this.sessionsService.create({
309303
date: date,
310304
groupId: groupId ?? null,

0 commit comments

Comments
 (0)