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:
parent
cb0c641ae4
commit
9ed1027b67
|
@ -1063,11 +1063,11 @@ public class CKanUtilsImpl implements CKanUtils{
|
||||||
checkArgument(!nameOrId.isEmpty());
|
checkArgument(!nameOrId.isEmpty());
|
||||||
|
|
||||||
try{
|
try{
|
||||||
// check if exists
|
CheckedCkanClient client = new CheckedCkanClient(CKAN_CATALOGUE_URL, CKAN_TOKEN_SYS);
|
||||||
CkanDataset product = client.getDataset(nameOrId);
|
CkanDataset product = client.getDataset(nameOrId);
|
||||||
return product != null;
|
return product != null;
|
||||||
}catch(Exception e){
|
}catch(Exception e){
|
||||||
logger.error("Unable to retrieve dataset information", e);
|
logger.debug("", e);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue