fix: adding poll to note during edit breakage
This commit is contained in:
parent
67cfa53118
commit
9a96ac02fc
1 changed files with 5 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue