Skip to content

Commit 9093a40

Browse files
Update app/models/concerns/foreman_remote_execution/smart_proxy_extensions.rb
Co-authored-by: Adam Růžička <[email protected]>
1 parent 3299a3e commit 9093a40

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

app/models/concerns/foreman_remote_execution/smart_proxy_extensions.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,8 @@ def update_pubkey
2626
def update_ca_pubkey
2727
return unless has_feature?(%w(SSH Script))
2828

29-
key = ::ProxyAPI::RemoteExecutionSSH.new(:url => url).ca_pubkey
3029
# smart proxy is not required to have a CA pubkey, in which case an empty string is returned
31-
key = nil if key == ""
30+
key = ::ProxyAPI::RemoteExecutionSSH.new(:url => url).ca_pubkey&.presence
3231
self.update_attribute(:ca_pubkey, key)
3332
key
3433
end

0 commit comments

Comments
 (0)