CLOUDSTACK-5865. Unable to use login API if domainId parameter is id and not uuid

This commit is contained in:
Likitha Shetty 2014-01-14 13:45:50 +05:30
parent 842b58d6ee
commit e5512960af
1 changed files with 5 additions and 1 deletions

View File

@ -760,7 +760,11 @@ public class ApiServer extends ManagerBase implements HttpRequestHandler, ApiSer
@Override
public Long fetchDomainId(String domainUUID) {
return _domainMgr.getDomain(domainUUID).getId();
Domain domain = _domainMgr.getDomain(domainUUID);
if (domain != null)
return domain.getId();
else
return null;
}
@Override