diff --git a/packages/backend/src/core/NoteEditService.ts b/packages/backend/src/core/NoteEditService.ts index acf916983..1901f2db7 100644 --- a/packages/backend/src/core/NoteEditService.ts +++ b/packages/backend/src/core/NoteEditService.ts @@ -438,7 +438,11 @@ export class NoteEditService implements OnApplicationShutdown { userHost: user.host, }); - await transactionalEntityManager.update(MiPoll, oldnote.id, poll); + if (!oldnote.hasPoll) { + await transactionalEntityManager.insert(MiPoll, poll); + } else { + await transactionalEntityManager.update(MiPoll, oldnote.id, poll); + } }); } else { await this.notesRepository.update(oldnote.id, note);