mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-03 17:59:37 +02:00
Avoid "No changed keys found" error
This commit is contained in:
parent
c5b66526eb
commit
3a6e3c9dee
2 changed files with 1 additions and 4 deletions
|
@ -69,8 +69,7 @@ function transactionRetryer <T> (func: (err: any, data: T) => any) {
|
|||
}
|
||||
|
||||
function saveInTransactionWithRetries <T extends Pick<Model, 'save' | 'changed'>> (model: T) {
|
||||
const changedKeys = model.changed()
|
||||
if (!changedKeys) throw new Error('No changed keys found')
|
||||
const changedKeys = model.changed() || []
|
||||
|
||||
return retryTransactionWrapper(() => {
|
||||
return sequelizeTypescript.transaction(async transaction => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue