Skip to content

Commit 00bc600

Browse files
committed
CLOUDSTACK-8857 listProjects doesn't return tags vmstopped or vmrunning when their value is zero
1 parent 1234cc1 commit 00bc600

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

server/src/com/cloud/api/query/dao/AccountJoinDaoImpl.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,8 @@ public void setResourceLimits(AccountJoinVO account, boolean fullView, ResourceL
164164
response.setTemplateAvailable(templateAvail);
165165

166166
// Get stopped and running VMs
167-
response.setVmStopped(account.getVmStopped());
168-
response.setVmRunning(account.getVmRunning());
167+
response.setVmStopped(account.getVmStopped()!=null ? account.getVmStopped() : 0);
168+
response.setVmRunning(account.getVmRunning()!=null ? account.getVmRunning() : 0);
169169

170170
//get resource limits for networks
171171
long networkLimit = ApiDBUtils.findCorrectResourceLimit(account.getNetworkLimit(), account.getId(), ResourceType.network);

0 commit comments

Comments
 (0)