minor fix to patchProductWithJSON

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-catalogue/ckan-util-library@152406 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Costantino Perciante 2017-08-02 10:06:07 +00:00
parent 1a44a38036
commit c765bd9530
1 changed files with 2 additions and 0 deletions

View File

@ -2505,6 +2505,8 @@ public class DataCatalogueImpl implements DataCatalogue{
HttpPost httpPostRequest = new HttpPost(pathUpdatePatch);
httpPostRequest.setHeader("Authorization", CKAN_TOKEN_SYS);
// be sure the id of the item is there
jsonRequest.put("id", productId);
StringEntity params = new StringEntity(jsonRequest.toJSONString(), ContentType.APPLICATION_JSON);
httpPostRequest.setEntity(params);