This is an automated email from the ASF dual-hosted git repository.

rohit pushed a commit to branch 4.16
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


The following commit(s) were added to refs/heads/4.16 by this push:
     new 946f915  vmware: Persist empty values instead of null (#5748)
946f915 is described below

commit 946f9156e513df102c874f4cf1d9713516e5848d
Author: Nicolas Vazquez <[email protected]>
AuthorDate: Sat Jan 8 00:28:46 2022 -0300

    vmware: Persist empty values instead of null (#5748)
    
    This PR allows deploying VMware appliances missing default values on some 
properties
    Fixes: #5747
---
 server/src/main/java/com/cloud/vm/UserVmManagerImpl.java | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/server/src/main/java/com/cloud/vm/UserVmManagerImpl.java 
b/server/src/main/java/com/cloud/vm/UserVmManagerImpl.java
index f9cc263..c152546 100644
--- a/server/src/main/java/com/cloud/vm/UserVmManagerImpl.java
+++ b/server/src/main/java/com/cloud/vm/UserVmManagerImpl.java
@@ -4416,6 +4416,8 @@ public class UserVmManagerImpl extends ManagerBase 
implements UserVmManager, Vir
                             value = DBEncryptionUtil.encrypt(value);
                         }
                     }
+                } else if (value == null) {
+                    value = "";
                 }
                 if (s_logger.isTraceEnabled()) {
                     s_logger.trace(String.format("setting property '%s' as 
'%s' with value '%s'", key, detailKey, value));

Reply via email to