From 53bef85a63a5466725018428cea4de95ed3f6455 Mon Sep 17 00:00:00 2001 From: Pete Matsyburka Date: Fri, 13 Sep 2024 22:37:11 +0300 Subject: [PATCH] adjust cert vars --- lib/accounts.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/accounts.rb b/lib/accounts.rb index 0ce789d7..ea754ce9 100644 --- a/lib/accounts.rb +++ b/lib/accounts.rb @@ -111,6 +111,8 @@ module Accounts data else + return Docuseal.default_pkcs if Docuseal::CERTS.present? + EncryptedConfig.find_by(account:, key: EncryptedConfig::ESIGN_CERTS_KEY)&.value || EncryptedConfig.find_by(key: EncryptedConfig::ESIGN_CERTS_KEY).value end @@ -143,6 +145,8 @@ module Accounts value = EncryptedConfig.find_by(account:, key: EncryptedConfig::ESIGN_CERTS_KEY)&.value || {} Docuseal::CERTS.merge(value) + elsif Docuseal::CERTS.present? + Docuseal::CERTS else EncryptedConfig.find_by(key: EncryptedConfig::ESIGN_CERTS_KEY)&.value || {} end