From a729fd6234bdd4c179d7b9f96eda70fb4ae182a0 Mon Sep 17 00:00:00 2001 From: Pete Matsyburka Date: Thu, 6 Jun 2024 22:03:15 +0300 Subject: [PATCH] fix webhook url on testing --- lib/accounts.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/accounts.rb b/lib/accounts.rb index 93d4cc61..01158e98 100644 --- a/lib/accounts.rb +++ b/lib/accounts.rb @@ -81,8 +81,8 @@ module Accounts def load_webhook_url(account) configs = account.encrypted_configs.find_by(key: EncryptedConfig::WEBHOOK_URL_KEY) - unless Docuseal.multitenant? - configs ||= Account.order(:id).first.encrypted_configs.find_by(key: EncryptedConfig::WEBHOOK_URL_KEY) + if !configs && !Docuseal.multitenant? && !account.testing? + configs = Account.order(:id).first.encrypted_configs.find_by(key: EncryptedConfig::WEBHOOK_URL_KEY) end configs&.value.presence