From 23c19888ca4cd9f44f7e04cf4c153f17d3ab23f5 Mon Sep 17 00:00:00 2001 From: Thomas Georgios Giannos Date: Thu, 1 Feb 2024 10:24:39 +0200 Subject: [PATCH] Added missing mapping for AssociatedProfilePublicModel on public api --- .../associatedprofile/AssociatedProfilePublicModel.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dmp-backend/core/src/main/java/eu/eudat/model/publicapi/associatedprofile/AssociatedProfilePublicModel.java b/dmp-backend/core/src/main/java/eu/eudat/model/publicapi/associatedprofile/AssociatedProfilePublicModel.java index 8b5ed6db2..8facb2a63 100644 --- a/dmp-backend/core/src/main/java/eu/eudat/model/publicapi/associatedprofile/AssociatedProfilePublicModel.java +++ b/dmp-backend/core/src/main/java/eu/eudat/model/publicapi/associatedprofile/AssociatedProfilePublicModel.java @@ -3,6 +3,7 @@ package eu.eudat.model.publicapi.associatedprofile; import eu.eudat.model.DmpDescriptionTemplate; import jakarta.xml.bind.annotation.*; +import java.util.HashMap; import java.util.Map; import java.util.UUID; @@ -52,6 +53,10 @@ public class AssociatedProfilePublicModel { public static AssociatedProfilePublicModel fromDmpDescriptionTemplate(DmpDescriptionTemplate dmpDescriptionTemplate) { AssociatedProfilePublicModel model = new AssociatedProfilePublicModel(); + model.setId(dmpDescriptionTemplate.getCurrentDescriptionTemplate().getId()); + model.setDescriptionTemplateId(dmpDescriptionTemplate.getCurrentDescriptionTemplate().getId()); + model.setLabel(dmpDescriptionTemplate.getCurrentDescriptionTemplate().getLabel()); + model.setData(new HashMap<>()); return model; } }