fix webhook url on testing

This commit is contained in:
Pete Matsyburka
2024-06-06 22:03:15 +03:00
parent c2051c156e
commit a729fd6234
+2 -2
View File
@@ -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