Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3197,13 +3197,11 @@ private Pair<List<AsyncJobJoinVO>, Integer> searchForAsyncJobsInternal(ListAsync
sc.addAnd("instanceType", SearchCriteria.Op.EQ, resourceType.toString());

final String resourceId = getResourceUuid(cmd.getResourceId());
if (resourceId == null) {
throw new InvalidParameterValueException("Invalid resource id for the resource type " + resourceType);
if (resourceId != null) {
sc.addAnd("instanceUuid", SearchCriteria.Op.EQ, resourceId);
}

sc.addAnd("instanceUuid", SearchCriteria.Op.EQ, resourceId);
} else if (cmd.getResourceId() != null) {
throw new InvalidParameterValueException("Resource type must be specified for the resource id");
throw new InvalidParameterValueException(String.format("%s parameter must be used with %s parameter", ApiConstants.RESOURCE_ID, ApiConstants.RESOURCE_TYPE));
}

return _jobJoinDao.searchAndCount(sc, searchFilter);
Expand Down
Loading