bug fix
This commit is contained in:
parent
b525ea3437
commit
4c34f1f606
|
@ -80,8 +80,9 @@ public class ZenodoBuilder {
|
|||
org.opencdmp.commonmodels.models.dmpblueprint.FieldModel fieldOfSemantic = this.getFieldOfSemantic(dmp, SEMANTIC_PUBLICATION_DATE);
|
||||
if (fieldOfSemantic != null){
|
||||
DmpBlueprintValueModel dmpBlueprintValueModel = this.getDmpBlueprintValue(dmp, fieldOfSemantic.getId());
|
||||
|
||||
if (dmpBlueprintValueModel != null && dmpBlueprintValueModel.getValue() != null && !dmpBlueprintValueModel.getValue().isBlank()){
|
||||
if (dmpBlueprintValueModel != null && dmpBlueprintValueModel.getDateValue() != null) {
|
||||
deposit.getMetadata().setPublicationDate(DateTimeFormatter.ofPattern("yyyy-MM-dd").withZone(ZoneId.systemDefault()).format(dmpBlueprintValueModel.getDateValue()));
|
||||
} else if (dmpBlueprintValueModel != null && dmpBlueprintValueModel.getValue() != null && !dmpBlueprintValueModel.getValue().isBlank()){
|
||||
try {
|
||||
Instant instant = Instant.parse(dmpBlueprintValueModel.getValue());
|
||||
deposit.getMetadata().setPublicationDate(DateTimeFormatter.ofPattern("yyyy-MM-dd").withZone(ZoneId.systemDefault()).format(instant));
|
||||
|
|
Loading…
Reference in New Issue