From 7d6790b22503167bede6fbcf2b4962efca38d91c Mon Sep 17 00:00:00 2001 From: gkolokythas Date: Thu, 12 Dec 2019 13:04:00 +0200 Subject: [PATCH] Fixes bug missing Project id on default creating Project entity on DMP. --- .../java/eu/eudat/logic/managers/DataManagementPlanManager.java | 1 + 1 file changed, 1 insertion(+) diff --git a/dmp-backend/web/src/main/java/eu/eudat/logic/managers/DataManagementPlanManager.java b/dmp-backend/web/src/main/java/eu/eudat/logic/managers/DataManagementPlanManager.java index 49d0816f2..678b10a26 100644 --- a/dmp-backend/web/src/main/java/eu/eudat/logic/managers/DataManagementPlanManager.java +++ b/dmp-backend/web/src/main/java/eu/eudat/logic/managers/DataManagementPlanManager.java @@ -724,6 +724,7 @@ public class DataManagementPlanManager { if (projectEntity != null) project.setId(projectEntity.getId()); else { project.setType(Project.ProjectType.EXTERNAL.getValue()); + if (project.getId() == null) project.setId(UUID.randomUUID()); projectDao.createOrUpdate(project); } }