From f38b82503347b16c945102c55c6a7a0c80a7060c Mon Sep 17 00:00:00 2001 From: sgiannopoulos Date: Thu, 10 Oct 2024 10:46:24 +0300 Subject: [PATCH] migration fixes (cherry picked from commit 0d9f3890afa3abdccb994bfb0dc68c21fd54ad89) --- .../eudat/migration/DatasetMigrationService.java | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/dmp-migration-tool/web/src/main/java/eu/old/eudat/migration/DatasetMigrationService.java b/dmp-migration-tool/web/src/main/java/eu/old/eudat/migration/DatasetMigrationService.java index 4bb901f26..2f7985cbd 100644 --- a/dmp-migration-tool/web/src/main/java/eu/old/eudat/migration/DatasetMigrationService.java +++ b/dmp-migration-tool/web/src/main/java/eu/old/eudat/migration/DatasetMigrationService.java @@ -427,18 +427,7 @@ public class DatasetMigrationService { propertyDefinitionFieldSetEntity.setItems(new ArrayList<>()); propertyDefinitionEntity.getFieldSets().put(currentFieldSet.getId().trim(), propertyDefinitionFieldSetEntity); } - - PropertyDefinitionFieldSetItemEntity propertyDefinitionFieldSetItemEntity; - if (this.conventionService.isListNullOrEmpty(propertyDefinitionFieldSetEntity.getItems())){ - propertyDefinitionFieldSetItemEntity = new PropertyDefinitionFieldSetItemEntity(); - propertyDefinitionFieldSetItemEntity.setFields(new HashMap<>()); - propertyDefinitionFieldSetItemEntity.setOrdinal(SimpleFieldSetOrdinal); - propertyDefinitionFieldSetEntity.getItems().add(propertyDefinitionFieldSetItemEntity); - } else { - propertyDefinitionFieldSetItemEntity = propertyDefinitionFieldSetEntity.getItems().getFirst(); - } - - propertyDefinitionFieldSetItemEntity.setComment(comment); + propertyDefinitionFieldSetEntity.setComment(comment); } private FieldEntity buildField(Dataset item, org.opencdmp.commons.types.descriptiontemplate.FieldEntity currentField, Object propertyValue, Map referenceTypeDefinitionEntityMap, Map referenceMap, int ordinal, List createdDescriptionReferenceEntities, Map savedTagIdsByName, HashSet existingTagIds){