Skip to content

Commit

Permalink
Make samples generate new uuid so that they don't overwrite any exist…
Browse files Browse the repository at this point in the history
…ing data.

Fix for geonetwork#7274
  • Loading branch information
Ian committed Aug 15, 2023
1 parent 5e74d8a commit d7b42c6
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
import org.fao.geonet.api.processing.report.SimpleMetadataProcessingReport;
import org.fao.geonet.api.tools.i18n.LanguageUtils;
import org.fao.geonet.constants.Geonet;
import org.fao.geonet.constants.Params;
import org.fao.geonet.domain.AbstractMetadata;
import org.fao.geonet.domain.Metadata;
import org.fao.geonet.domain.MetadataType;
Expand Down Expand Up @@ -123,8 +124,8 @@ SimpleMetadataProcessingReport addSamples(
UserSession userSession = ApiUtils.getUserSession(request.getSession());

Element params = new Element("params");
params.addContent(new Element("file_type").setText("mef"));
params.addContent(new Element("uuidAction").setText("overwrite"));
params.addContent(new Element(Params.FILE_TYPE).setText("mef"));
params.addContent(new Element(Params.UUID_ACTION).setText(MEFLib.UuidAction.GENERATEUUID.toString()));
for (String schemaName : schema) {
Log.info(Geonet.DATA_MANAGER, "Loading sample data for schema "
+ schemaName);
Expand Down

0 comments on commit d7b42c6

Please sign in to comment.