From 018024d6f7d5e2fe08da4459de3b719c328adaca Mon Sep 17 00:00:00 2001 From: gkolokythas Date: Tue, 16 Apr 2019 16:42:24 +0300 Subject: [PATCH] Fixes bug with Dataset Profile create. --- dmp-backend/web/src/main/java/eu/eudat/controllers/Admin.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dmp-backend/web/src/main/java/eu/eudat/controllers/Admin.java b/dmp-backend/web/src/main/java/eu/eudat/controllers/Admin.java index 3afea30b7..c9588db00 100644 --- a/dmp-backend/web/src/main/java/eu/eudat/controllers/Admin.java +++ b/dmp-backend/web/src/main/java/eu/eudat/controllers/Admin.java @@ -51,6 +51,8 @@ public class Admin extends BaseController { //this.getLoggerService().info(principal, "Admin Added Dataset Profile"); DatasetProfile shortenProfile = profile.toShort(); eu.eudat.data.entities.DatasetProfile modelDefinition = AdminManager.generateViewStyleDefinition(shortenProfile, getApiContext()); + modelDefinition.setGroupId(UUID.randomUUID()); + modelDefinition.setVersion((short) 0); this.getApiContext().getOperationsContext().getDatabaseRepository().getDatasetProfileDao().createOrUpdate(modelDefinition); return ResponseEntity.status(HttpStatus.OK).body(modelDefinition.getId()); }