From ee0d4998915ea72f649d06043ebf21e6c8707ccf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=20Garc=C3=ADa?= Date: Thu, 4 Jul 2024 09:44:55 +0200 Subject: [PATCH] WebDav harvester / Use current date for metadata change date if can't be retrieved from the remote metadata --- .../geonet/kernel/harvest/harvester/webdav/Harvester.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/harvesters/src/main/java/org/fao/geonet/kernel/harvest/harvester/webdav/Harvester.java b/harvesters/src/main/java/org/fao/geonet/kernel/harvest/harvester/webdav/Harvester.java index 681710df57a..7b0f0c4366b 100644 --- a/harvesters/src/main/java/org/fao/geonet/kernel/harvest/harvester/webdav/Harvester.java +++ b/harvesters/src/main/java/org/fao/geonet/kernel/harvest/harvester/webdav/Harvester.java @@ -311,6 +311,11 @@ private void addMetadata(RemoteFile rf) throws Exception { date = rf.getChangeDate(); } } + + if (date == null) { + date = new ISODate(); + } + AbstractMetadata metadata = new Metadata(); metadata.setUuid(uuid); metadata.getDataInfo().