Skip to content

Commit 8148c53

Browse files
authored
Ignore projectid=-1 on Quota summary (#13658)
1 parent 424f0df commit 8148c53

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

plugins/database/quota/src/main/java/org/apache/cloudstack/api/command/QuotaSummaryCmd.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,9 @@ public void setListAll(Boolean listAll) {
116116
}
117117

118118
public Long getProjectId() {
119+
if (projectId == null || projectId == -1L) {
120+
return null;
121+
}
119122
return projectId;
120123
}
121124

@@ -129,9 +132,10 @@ public QuotaAccountStateFilter getAccountStateToShow() {
129132

130133
@Override
131134
public long getEntityOwnerId() {
132-
if (ObjectUtils.allNull(accountId, accountName, projectId)) {
135+
Long convertedProjectId = getProjectId();
136+
if (ObjectUtils.allNull(accountId, accountName, convertedProjectId)) {
133137
return -1;
134138
}
135-
return _accountService.finalizeAccountId(accountId, accountName, domainId, projectId);
139+
return _accountService.finalizeAccountId(accountId, accountName, domainId, convertedProjectId);
136140
}
137141
}

0 commit comments

Comments
 (0)