diff --git a/core/src/main/java/org/fao/geonet/kernel/mef/Importer.java b/core/src/main/java/org/fao/geonet/kernel/mef/Importer.java index a5cd2c695fc..dedc9a0b1f8 100644 --- a/core/src/main/java/org/fao/geonet/kernel/mef/Importer.java +++ b/core/src/main/java/org/fao/geonet/kernel/mef/Importer.java @@ -519,6 +519,8 @@ public static void importRecord(String uuid, MEFLib.UuidAction uuidAction, List< if (Log.isDebugEnabled(Geonet.MEF)) { Log.debug(Geonet.MEF, "Deleting existing metadata with UUID : " + uuid); } + Store store = context.getBean("resourceStore", Store.class); + store.delResources(context, uuid, true); metadataManager.deleteMetadata(context, dm.getMetadataId(uuid)); metadataManager.flush(); }