diff --git a/src/main/java/org/gcube/informationsystem/publisher/RegistryPublisherImpl.java b/src/main/java/org/gcube/informationsystem/publisher/RegistryPublisherImpl.java index 08f8aa7..45495ac 100644 --- a/src/main/java/org/gcube/informationsystem/publisher/RegistryPublisherImpl.java +++ b/src/main/java/org/gcube/informationsystem/publisher/RegistryPublisherImpl.java @@ -446,6 +446,9 @@ public class RegistryPublisherImpl implements RegistryPublisher { private HashSet updateResourceScopes(T resource) { HashSet vosScopes = Utils.getInternalVOScopes(resource); +// if the resource type is a RunningInstance or a HostingNode the check on the most recent resource is bypassed + if((resource.type().toString().equalsIgnoreCase("RunningInstance")) || (resource.type().toString().equalsIgnoreCase("GHN"))) + return vosScopes; //extract the scopes from the more recent resource found at vo level List latestScopesFound= Utils.setLatestInternalScopes(resource, vosScopes); log.debug("latest scope found are "+latestScopesFound); diff --git a/src/main/java/org/gcube/informationsystem/publisher/utils/Utils.java b/src/main/java/org/gcube/informationsystem/publisher/utils/Utils.java index a3128b1..27aa96b 100644 --- a/src/main/java/org/gcube/informationsystem/publisher/utils/Utils.java +++ b/src/main/java/org/gcube/informationsystem/publisher/utils/Utils.java @@ -154,6 +154,7 @@ public class Utils { private static List extractInternalScopes(T resource, String latestVO) { T extractedResource=null; + log.debug("checking resource "+resource.id()+" type: "+resource.type()); if(resource.type().toString().equalsIgnoreCase("RuntimeResource")){ extractedResource= (T)getServiceEndpointByID(resource.id(), latestVO); }else if(resource.type().toString().equalsIgnoreCase("GenericResource")){