From 4d39804a62a20a4dfc63e59188a2667ba30eb04f Mon Sep 17 00:00:00 2001 From: Geoffrey Karnbach Date: Mon, 23 Dec 2024 09:20:58 +0100 Subject: [PATCH] Bugfix: Add null check in export method for dataset identifier --- .../AbstractTemplateExportScienceEuropeComponents.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/damap/base/conversion/AbstractTemplateExportScienceEuropeComponents.java b/src/main/java/org/damap/base/conversion/AbstractTemplateExportScienceEuropeComponents.java index 176d59be..5484b97a 100644 --- a/src/main/java/org/damap/base/conversion/AbstractTemplateExportScienceEuropeComponents.java +++ b/src/main/java/org/damap/base/conversion/AbstractTemplateExportScienceEuropeComponents.java @@ -1175,7 +1175,8 @@ public void composeTableReusedDatasets(XWPFDocument document, XWPFTable xwpfTabl docVar.add(datasetTableIDs.get(dataset.id)); docVar.add(Optional.ofNullable(dataset.getTitle()).orElse("")); - if (dataset.getDatasetIdentifier() != null) { + if (dataset.getDatasetIdentifier() != null + && dataset.getDatasetIdentifier().getIdentifier() != null) { docVar.add(dataset.getDatasetIdentifier().getIdentifier()); } else { docVar.add("");