DaanHoogland commented on a change in pull request #4794:
URL: https://github.com/apache/cloudstack/pull/4794#discussion_r594484504



##########
File path: server/src/main/java/com/cloud/template/TemplateManagerImpl.java
##########
@@ -1936,7 +1937,12 @@ public VMTemplateVO 
createPrivateTemplateRecord(CreateTemplateCmd cmd, Account t
                     UserVmVO userVm = _userVmDao.findById(vmId);
                     if (userVm != null) {
                         _userVmDao.loadDetails(userVm);
-                        details.putAll(userVm.getDetails());
+                        Map<String, String> vmDetails = userVm.getDetails();
+                        vmDetails = vmDetails.entrySet()
+                                .stream()
+                                .filter(map -> map.getValue() != null)
+                                .collect(Collectors.toMap(map -> map.getKey(), 
map -> map.getValue()));
+                        details.putAll(vmDetails);

Review comment:
       exactly, see my general comment above.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to