diff --git a/lib/trivial_backend_sgx_repo.rb b/lib/trivial_backend_sgx_repo.rb index d25bb28155cb9cdd6169cae321ef21df16d462bc..90565db20dc2600c234189794930478dfacd0028 100644 --- a/lib/trivial_backend_sgx_repo.rb +++ b/lib/trivial_backend_sgx_repo.rb @@ -24,7 +24,7 @@ class TrivialBackendSgxRepo def get(customer_id, tel: nil) use_jid(customer_id).then do |sgx_jid| - creds = sgx_jid ? CONFIG[:sgx_creds][sgx_jid.to_s.to_sym] : @creds + creds = sgx_jid && sgx_jid.is_a?(String) ? CONFIG[:sgx_creds][sgx_jid.to_sym] : @creds BackendSgx.new( jid: sgx_jid ? Blather::JID.new(sgx_jid) : @jid, creds: creds, from_jid: Blather::JID.new("customer_#{customer_id}", @component_jid),