diff --git a/src/main/java/org/gcube/datacatalogue/ckanutillibrary/DataCatalogueImpl.java b/src/main/java/org/gcube/datacatalogue/ckanutillibrary/DataCatalogueImpl.java index 561d921..b489fa5 100644 --- a/src/main/java/org/gcube/datacatalogue/ckanutillibrary/DataCatalogueImpl.java +++ b/src/main/java/org/gcube/datacatalogue/ckanutillibrary/DataCatalogueImpl.java @@ -1931,6 +1931,9 @@ public class DataCatalogueImpl implements DataCatalogue{ Map> fromCKANCustomFields = new HashMap>(); CheckedCkanClient client = new CheckedCkanClient(CKAN_CATALOGUE_URL, apiKey); List extras = client.getDataset(productId).getExtras(); + + if(extras == null) + extras = new ArrayList(); // fill the above map with these values for (CkanPair ckanPair : extras) {