fix to existsProductWithNameOrId method

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-catalogue/ckan-util-library@131771 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Costantino Perciante 2016-09-26 08:32:03 +00:00
parent cb0c641ae4
commit 9ed1027b67
1 changed files with 2 additions and 2 deletions

View File

@ -1063,11 +1063,11 @@ public class CKanUtilsImpl implements CKanUtils{
checkArgument(!nameOrId.isEmpty());
try{
// check if exists
CheckedCkanClient client = new CheckedCkanClient(CKAN_CATALOGUE_URL, CKAN_TOKEN_SYS);
CkanDataset product = client.getDataset(nameOrId);
return product != null;
}catch(Exception e){
logger.error("Unable to retrieve dataset information", e);
logger.debug("", e);
return false;
}
}