Fixed function

This commit is contained in:
Luca Frosini 2023-05-17 18:04:08 +02:00
parent d8947f2814
commit cff16573dd
1 changed files with 1 additions and 1 deletions

View File

@ -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);