JoaoJandre commented on code in PR #13661:
URL: https://github.com/apache/cloudstack/pull/13661#discussion_r3624954698


##########
server/src/main/java/org/apache/cloudstack/backup/BackupManagerImpl.java:
##########
@@ -2653,11 +2653,15 @@ public BackupResponse createBackupResponse(Backup 
backup, Boolean listVmDetails)
         response.setProtectedSize(backup.getProtectedSize());
         response.setStatus(backup.getStatus());
         response.setIntervalType("MANUAL");
-        response.setCompressionStatus(backup.getCompressionStatus());
-        if (backup.getUncompressedSize() != null && 
backup.getUncompressedSize() > 0) {
-            response.setUncompressedSize(backup.getUncompressedSize());
+        if (backup.getCompressionStatus() != null) {
+            response.setCompressionStatus(backup.getCompressionStatus());
+            if (backup.getUncompressedSize() != null && 
backup.getUncompressedSize() > 0) {
+                response.setUncompressedSize(backup.getUncompressedSize());
+            }
+        }
+        if (backup.getValidationStatus() != null) {

Review Comment:
   Validation and Compression are independent. A provider may implement one but 
not the other. Thus the checks should be separate.



-- 
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.

To unsubscribe, e-mail: [email protected]

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

Reply via email to