Fixed patch method

This commit is contained in:
Luca Frosini 2020-12-02 16:57:39 +01:00
parent ab0892eaf3
commit 7a434f999a
1 changed files with 2 additions and 1 deletions

View File

@ -654,11 +654,12 @@ public class CKANPackage extends CKAN {
@Override
public String patch(String json) {
try {
JsonNode jsonNode = checkBaseInformation(json);
JsonNode jsonNode = checkBaseInformation(json, true);
read();
this.itemID = result.get(ID_KEY).asText();
((ObjectNode)jsonNode).put(ID_KEY, this.itemID);
Map<String,CKANResource> originalResources = new HashMap<>();
ArrayNode originalResourcesarrayNode = (ArrayNode) result.get(RESOURCES_KEY);