Skip to content

Commit 2bed4ac

Browse files
shwstppryadvr
authored andcommitted
server: fix for empty listdiskofferings response for admin
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
1 parent f46250f commit 2bed4ac

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

server/src/main/java/com/cloud/api/query/QueryManagerImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2603,7 +2603,7 @@ private Pair<List<DiskOfferingJoinVO>, Integer> searchForDiskOfferingsInternal(L
26032603
for (int i = offerings.size() - 1; i >= 0; i--) {
26042604
DiskOfferingJoinVO offering = offerings.get(i);
26052605
Map<String, String> details = diskOfferingDetailsDao.listDetailsKeyPairs(offering.getId());
2606-
boolean toRemove = isRecursive;
2606+
boolean toRemove = account.getType() == Account.ACCOUNT_TYPE_ADMIN ? false : isRecursive;
26072607
if (account.getType() != Account.ACCOUNT_TYPE_ADMIN &&
26082608
details.containsKey(ApiConstants.DOMAIN_ID_LIST) &&
26092609
!Strings.isNullOrEmpty(details.get(ApiConstants.DOMAIN_ID_LIST))) {

0 commit comments

Comments
 (0)