Skip to content
This repository has been archived by the owner on Oct 5, 2023. It is now read-only.

Commit

Permalink
chore: 念のためにwhere使うように
Browse files Browse the repository at this point in the history
  • Loading branch information
yupix committed Sep 30, 2023
1 parent 6943c69 commit c067ff1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/migration/note.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export async function migrateNote(noteId: string, useNote?: Note) {
if (note.replyId) await checkReply(note.replyId); // リプライが既に登録されてるか確認し、無いなら再帰的に作成する
if (note.renoteId) await checkRenoteId(note.renoteId); // renoteが既に登録されてるか確認し、無いなら再帰的に作成する

const checkExists = await noteRepository.findOne(note.id); // 既にノートが移行済みか確認
const checkExists = await noteRepository.findOne({where: {id: note.id}}); // 既にノートが移行済みか確認
if (checkExists) return; // 移行済みならスキップする

await save(note);
Expand Down

0 comments on commit c067ff1

Please sign in to comment.