From dd30f79f7cb87580da2fc8247b2988101c41603a Mon Sep 17 00:00:00 2001 From: Sylvain Date: Mon, 9 Jan 2023 10:20:19 +0100 Subject: [PATCH] (bug) unable to build accounting archive --- CHANGELOG.md | 1 + app/workers/archive_worker.rb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5634da947..30f829eaa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ - Improved fix_invoice_item task - Fix a bug: cryptic error message when failed to create a manager - Fix a bug: unable to restore accounting periods closed by a deleted admin +- Fix a bug: unable to build an acocunting archive if the operator was deleted - Fix a bug: unable to udpate an event category ## v5.6.1 2023 January 6 diff --git a/app/workers/archive_worker.rb b/app/workers/archive_worker.rb index c7fb99124..d36857296 100644 --- a/app/workers/archive_worker.rb +++ b/app/workers/archive_worker.rb @@ -28,7 +28,7 @@ class ArchiveWorker end NotificationCenter.call type: :notify_admin_archive_complete, - receiver: User.find(period.closed_by), + receiver: User.where(id: period.closed_by)&.first, attached_object: period end