fix error when editing a poll
This commit is contained in:
parent
8b3ea577da
commit
7b809b2b58
1 changed files with 2 additions and 2 deletions
|
|
@ -583,13 +583,13 @@ export class NoteEditService implements OnApplicationShutdown {
|
|||
});
|
||||
|
||||
if (oldPoll) {
|
||||
await transactionalEntityManager.update(MiPoll, { pollId: oldPoll.noteId }, poll);
|
||||
await transactionalEntityManager.update(MiPoll, { noteId: oldPoll.noteId }, poll);
|
||||
} else {
|
||||
await transactionalEntityManager.insert(MiPoll, poll);
|
||||
}
|
||||
// Delete poll
|
||||
} else if (oldPoll) {
|
||||
await transactionalEntityManager.delete(MiPoll, { pollId: oldPoll.noteId });
|
||||
await transactionalEntityManager.delete(MiPoll, { noteId: oldPoll.noteId });
|
||||
}
|
||||
});
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue