Skip to content

Commit 0a66bde

Browse files
Update server/src/main/java/com/cloud/api/ApiResponseHelper.java
Co-authored-by: Pearl Dsilva <pearl1594@gmail.com>
1 parent b51cb81 commit 0a66bde

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

server/src/main/java/com/cloud/api/ApiResponseHelper.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4347,7 +4347,9 @@ private UsageResourceDetails populateNetworkBytesUsageResponse(Usage usageRecord
43474347
if (network.getUuid() != null){
43484348
builder.append(" (").append(network.getUuid()).append(") ");
43494349
}
4350-
builder.append(" " + toHumanReadableSize(usageRecord.getRawUsage().longValue()) + " ");
4350+
if (usageRecord.getRawUsage()!= null) {
4351+
builder.append(" " + toHumanReadableSize(usageRecord.getRawUsage().longValue()) + " ");
4352+
}
43514353
}
43524354
if (vm != null) {
43534355
builder.append("using router ").append(vm.getInstanceName()).append(" (").append(vm.getUuid()).append(")");

0 commit comments

Comments
 (0)