You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by su...@apache.org on 2024/06/22 05:47:16 UTC

(cloudstack) branch 4.19 updated: Fix volume response for service offering with disk offering (#9273)

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

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


The following commit(s) were added to refs/heads/4.19 by this push:
     new 59e9ab9efee Fix volume response for service offering with disk offering (#9273)
59e9ab9efee is described below

commit 59e9ab9efee82705d569fdcbc673ae788b90cd17
Author: Vishesh <vi...@gmail.com>
AuthorDate: Sat Jun 22 11:17:11 2024 +0530

    Fix volume response for service offering with disk offering (#9273)
---
 .../src/main/java/com/cloud/api/query/dao/VolumeJoinDaoImpl.java   | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/server/src/main/java/com/cloud/api/query/dao/VolumeJoinDaoImpl.java b/server/src/main/java/com/cloud/api/query/dao/VolumeJoinDaoImpl.java
index 1060fd840b5..29f66b981bd 100644
--- a/server/src/main/java/com/cloud/api/query/dao/VolumeJoinDaoImpl.java
+++ b/server/src/main/java/com/cloud/api/query/dao/VolumeJoinDaoImpl.java
@@ -296,9 +296,10 @@ public class VolumeJoinDaoImpl extends GenericDaoBaseWithTagInformation<VolumeJo
         ServiceOffering serviceOffering = null;
         if (computeOnlyDiskOffering != null) {
             serviceOffering = ApiDBUtils.findServiceOfferingByComputeOnlyDiskOffering(volume.getDiskOfferingId(), false);
-        }
-        if (serviceOffering == null) {
-            serviceOffering = ApiDBUtils.findServiceOfferingByComputeOnlyDiskOffering(volume.getDiskOfferingId(), true);
+            if (serviceOffering == null) {
+                // Check again for removed ones
+                serviceOffering = ApiDBUtils.findServiceOfferingByComputeOnlyDiskOffering(volume.getDiskOfferingId(), true);
+            }
         }
         return serviceOffering;
     }