This is an automated email from the ASF dual-hosted git repository.
harikrishna-patnala pushed a commit to branch 4.20
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
The following commit(s) were added to refs/heads/4.20 by this push:
new 69fc541737e server: ignore projectid=-1 for finding owner (#12695)
69fc541737e is described below
commit 69fc541737e5fd98b170f5df8e359e2f6c5aaff6
Author: Abhishek Kumar <[email protected]>
AuthorDate: Mon Aug 17 12:58:35 2026 +0530
server: ignore projectid=-1 for finding owner (#12695)
Fixes #12693
Signed-off-by: Abhishek Kumar <[email protected]>
---
server/src/main/java/com/cloud/user/AccountManagerImpl.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/server/src/main/java/com/cloud/user/AccountManagerImpl.java
b/server/src/main/java/com/cloud/user/AccountManagerImpl.java
index 1f6e8d5b49e..cbdd36fef2a 100644
--- a/server/src/main/java/com/cloud/user/AccountManagerImpl.java
+++ b/server/src/main/java/com/cloud/user/AccountManagerImpl.java
@@ -174,8 +174,8 @@ import com.cloud.user.dao.UserDataDao;
import com.cloud.utils.ConstantTimeComparator;
import com.cloud.utils.NumbersUtil;
import com.cloud.utils.Pair;
-import com.cloud.utils.Ternary;
import com.cloud.utils.StringUtils;
+import com.cloud.utils.Ternary;
import com.cloud.utils.component.ComponentContext;
import com.cloud.utils.component.Manager;
import com.cloud.utils.component.ManagerBase;
@@ -2563,7 +2563,7 @@ public class AccountManagerImpl extends ManagerBase
implements AccountManager, M
throw new InvalidParameterValueException("ProjectId and
account/domainId can't be specified together");
}
- if (projectId != null) {
+ if (projectId != null && projectId != -1L) {
Project project = _projectMgr.getProject(projectId);
if (project == null) {
throw new InvalidParameterValueException("Unable to find
project by id=" + projectId);