diff --git a/src/main/java/org/gcube/informationsystem/resourceregistry/publisher/ResourceRegistryPublisherImpl.java b/src/main/java/org/gcube/informationsystem/resourceregistry/publisher/ResourceRegistryPublisherImpl.java index 0e77fdc..4b3e086 100644 --- a/src/main/java/org/gcube/informationsystem/resourceregistry/publisher/ResourceRegistryPublisherImpl.java +++ b/src/main/java/org/gcube/informationsystem/resourceregistry/publisher/ResourceRegistryPublisherImpl.java @@ -412,12 +412,12 @@ public class ResourceRegistryPublisherImpl implements ResourceRegistryPublisher throws SchemaViolationException, AlreadyPresentException, ResourceRegistryException { try { String type = er.getTypeName(); - String json = ElementMapper.marshal(er); UUID uuid = er.getID(); if (uuid == null) { uuid = UUIDManager.getInstance().generateValidUUID(); er.setID(uuid); } + String json = ElementMapper.marshal(er); return create(type, json, uuid); } catch (ResourceRegistryException e) { // logger.trace("Error Creating {}", facet, e);