diff --git a/src/main/java/org/gcube/datacatalogue/grsf_manage_widget/server/manage/Utils.java b/src/main/java/org/gcube/datacatalogue/grsf_manage_widget/server/manage/Utils.java index e491e4c..d8079b7 100644 --- a/src/main/java/org/gcube/datacatalogue/grsf_manage_widget/server/manage/Utils.java +++ b/src/main/java/org/gcube/datacatalogue/grsf_manage_widget/server/manage/Utils.java @@ -195,12 +195,12 @@ public class Utils { try(CloseableHttpClient httpClient = HttpClientBuilder.create().build();){ - // if there are merges, update the status of the involved records immediately - if(bean.isMergesInvolved()) - updateStatusInvolvedRecords(bean, catalogue); - // send update to the knowledge base GRSFUpdaterServiceClient.updateKB(httpClient, serviceUrl, bean, catalogue, username, fullName); + + // if there are merges, update the status of the other involved records + if(bean.isMergesInvolved()) + updateStatusInvolvedRecords(bean, catalogue); // require social networking url final String baseUrlSocial = SocialCommunications.getBaseUrlSocialService(httpServletRequest); @@ -299,8 +299,6 @@ public class Utils { for(SimilarGRSFRecord s: bean.getSimilarGrsfRecords()){ if(s.isSuggestedMerge()){ String productId = s.getKnowledgeBaseId(); - // CkanDataset dataset = catalogue.getDataset(productId, sysApi); - // Map> extrasMap = getExtrasAsHashMap(dataset.getExtras()); Map> updateStatus = new HashMap>(1); updateStatus.put(Constants.STATUS_OF_THE_GRSF_RECORD_CUSTOM_KEY, Arrays.asList(Status.To_be_Merged.getOrigName())); catalogue.patchProductCustomFields(productId, sysApi, updateStatus, true);