@@ -80,7 +80,7 @@ public AccountResponse newAccountResponse(AccountJoinVO account) {
8080 setResourceLimits (account , accountIsAdmin , accountResponse );
8181
8282 //get resource limits for projects
83- long projectLimit = ApiDBUtils .findCorrectResourceLimit (account .getProjectLimit (), account .getId (), ResourceType .project );
83+ long projectLimit = ApiDBUtils .findCorrectResourceLimit (account .getProjectLimit (), account .getType (), ResourceType .project );
8484 String projectLimitDisplay = (accountIsAdmin || projectLimit == -1 ) ? "Unlimited" : String .valueOf (projectLimit );
8585 long projectTotal = (account .getProjectTotal () == null ) ? 0 : account .getProjectTotal ();
8686 String projectAvail = (accountIsAdmin || projectLimit == -1 ) ? "Unlimited" : String .valueOf (projectLimit - projectTotal );
@@ -115,7 +115,7 @@ public AccountResponse newAccountResponse(AccountJoinVO account) {
115115 @ Override
116116 public void setResourceLimits (AccountJoinVO account , boolean accountIsAdmin , ResourceLimitAndCountResponse response ) {
117117 // Get resource limits and counts
118- long vmLimit = ApiDBUtils .findCorrectResourceLimit (account .getVmLimit (), account .getId (), ResourceType .user_vm );
118+ long vmLimit = ApiDBUtils .findCorrectResourceLimit (account .getVmLimit (), account .getType (), ResourceType .user_vm );
119119 String vmLimitDisplay = (accountIsAdmin || vmLimit == -1 ) ? "Unlimited" : String .valueOf (vmLimit );
120120 long vmTotal = (account .getVmTotal () == null ) ? 0 : account .getVmTotal ();
121121 String vmAvail = (accountIsAdmin || vmLimit == -1 ) ? "Unlimited" : String .valueOf (vmLimit - vmTotal );
0 commit comments