minor fix at patchProductCustomFields

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-catalogue/ckan-util-library@139933 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Costantino Perciante 2016-12-12 16:39:30 +00:00
parent ad7fd86acc
commit 5c1ca13f14
1 changed files with 3 additions and 0 deletions

View File

@ -1931,6 +1931,9 @@ public class DataCatalogueImpl implements DataCatalogue{
Map<String, List<String>> fromCKANCustomFields = new HashMap<String, List<String>>();
CheckedCkanClient client = new CheckedCkanClient(CKAN_CATALOGUE_URL, apiKey);
List<CkanPair> extras = client.getDataset(productId).getExtras();
if(extras == null)
extras = new ArrayList<CkanPair>();
// fill the above map with these values
for (CkanPair ckanPair : extras) {