From 30dcf8043a0c0ba0d35c2899b2ffb8aa488d0e5f Mon Sep 17 00:00:00 2001 From: amentis Date: Tue, 28 May 2024 09:58:50 +0300 Subject: [PATCH] dmp file name as dmp model label --- .../wordfiletransformer/WordFileTransformerService.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/core/src/main/java/org/opencdmp/filetransformer/docx/service/wordfiletransformer/WordFileTransformerService.java b/core/src/main/java/org/opencdmp/filetransformer/docx/service/wordfiletransformer/WordFileTransformerService.java index 84f1159..e7225a8 100644 --- a/core/src/main/java/org/opencdmp/filetransformer/docx/service/wordfiletransformer/WordFileTransformerService.java +++ b/core/src/main/java/org/opencdmp/filetransformer/docx/service/wordfiletransformer/WordFileTransformerService.java @@ -420,16 +420,15 @@ public class WordFileTransformerService implements FileTransformerClient { List grants = this.getReferenceModelOfTypeCode(dmpModel, this.wordFileTransformerServiceProperties.getGrantReferenceCode(), null); String fileName = null; if (dmpModel.getLabel() != null){ - return dmpModel.getLabel(); + return dmpModel.getLabel() + extension; } if (!grants.isEmpty() && grants.getFirst().getLabel() != null) { fileName = "DMP_" + grants.getFirst().getLabel(); fileName += "_" + dmpModel.getVersion(); - return fileName + extension; } - return fileName; + return fileName + extension; } private byte[] buildDescriptionWordDocument(DescriptionModel descriptionModel) throws IOException {