fix: adding poll to note during edit breakage

This commit is contained in:
Mar0xy 2023-10-06 21:12:33 +02:00
parent 67cfa53118
commit 9a96ac02fc
No known key found for this signature in database
GPG key ID: 56569BBE47D2C828

View file

@ -438,7 +438,11 @@ export class NoteEditService implements OnApplicationShutdown {
userHost: user.host, userHost: user.host,
}); });
if (!oldnote.hasPoll) {
await transactionalEntityManager.insert(MiPoll, poll);
} else {
await transactionalEntityManager.update(MiPoll, oldnote.id, poll); await transactionalEntityManager.update(MiPoll, oldnote.id, poll);
}
}); });
} else { } else {
await this.notesRepository.update(oldnote.id, note); await this.notesRepository.update(oldnote.id, note);