Avoid "No changed keys found" error

pull/6562/head
Chocobozzz 2024-08-19 10:13:33 +02:00
parent c5b66526eb
commit 3a6e3c9dee
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
2 changed files with 1 additions and 4 deletions

View File

@ -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 => {

View File

@ -287,8 +287,6 @@ export class UserExporter {
this.archive.on('entry', entryListener)
logger.error('Adding stream ' + archivePath)
// Prevent sending a stream that has an error on open resulting in a stucked archiving process
stream.once('readable', () => {
if (errored) return