diff --git a/src/main/java/org/gcube/informationsystem/resourceregistry/rest/ERManager.java b/src/main/java/org/gcube/informationsystem/resourceregistry/rest/ERManager.java index 3039d15..6c42e25 100644 --- a/src/main/java/org/gcube/informationsystem/resourceregistry/rest/ERManager.java +++ b/src/main/java/org/gcube/informationsystem/resourceregistry/rest/ERManager.java @@ -329,13 +329,7 @@ public class ERManager { Resource.NAME, uuid, ContextUtility.getCurrentContext()); ResourceManagement resourceManagement = new ResourceManagement(); resourceManagement.setUUID(UUID.fromString(uuid)); - boolean added = resourceManagement.addToContext(); - - resourceManagement = new ResourceManagement(); - resourceManagement.setUUID(UUID.fromString(uuid)); - resourceManagement.read(); - - return added; + return resourceManagement.addToContext(); } /**