dmp file name as dmp model label

This commit is contained in:
amentis 2024-05-28 09:58:50 +03:00
parent eabfe8a668
commit 30dcf8043a
1 changed files with 2 additions and 3 deletions

View File

@ -420,16 +420,15 @@ public class WordFileTransformerService implements FileTransformerClient {
List<ReferenceModel> 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 {