From 80eab2a0707dd79bb20ebdbc8adc2f32fe29a3dc Mon Sep 17 00:00:00 2001 From: luciajanikova <19lucia99@gmail.com> Date: Mon, 18 Nov 2024 15:12:01 +0100 Subject: [PATCH] Update callback on Fs::Box --- app/models/fs/box.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/fs/box.rb b/app/models/fs/box.rb index b1b30568..9cde9beb 100644 --- a/app/models/fs/box.rb +++ b/app/models/fs/box.rb @@ -18,7 +18,7 @@ class Fs::Box < Box DISABLED_MESSAGE_DRAFTS_IMPORT_KEYWORDS = ['(oblasť SPD)'] - after_create { update(syncable: tenant.feature_enabled?(:fs_sync)) } + before_create { self.syncable = tenant.feature_enabled?(:fs_sync) } validates_uniqueness_of :name, :short_name, scope: :tenant_id