From 3a6e3c9dee2f4ab7cadfb11695b1141e78a9b228 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 19 Aug 2024 10:13:33 +0200 Subject: [PATCH] Avoid "No changed keys found" error --- server/core/helpers/database-utils.ts | 3 +-- server/core/lib/user-import-export/user-exporter.ts | 2 -- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/server/core/helpers/database-utils.ts b/server/core/helpers/database-utils.ts index 6a8e3fdb8..30ecfa6f2 100644 --- a/server/core/helpers/database-utils.ts +++ b/server/core/helpers/database-utils.ts @@ -69,8 +69,7 @@ function transactionRetryer (func: (err: any, data: T) => any) { } function saveInTransactionWithRetries > (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 => { diff --git a/server/core/lib/user-import-export/user-exporter.ts b/server/core/lib/user-import-export/user-exporter.ts index a0aa237e0..3ea6b00ff 100644 --- a/server/core/lib/user-import-export/user-exporter.ts +++ b/server/core/lib/user-import-export/user-exporter.ts @@ -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