diff --git a/kgforge/specializations/models/rdf/store_service.py b/kgforge/specializations/models/rdf/store_service.py index 813345f4..5542e0f6 100644 --- a/kgforge/specializations/models/rdf/store_service.py +++ b/kgforge/specializations/models/rdf/store_service.py @@ -162,13 +162,11 @@ def recursive_resolve(self, context: Union[Dict, List, str]) -> Dict: return document def load_resource_graph_from_source(self, graph_id: str, schema_id: str) -> Graph: + try: - schema_resource = self.context_store.retrieve_schema(schema_id) - except RetrievalError as e: - try: - schema_resource = self.context_store.retrieve(schema_id, cross_bucket=False, version=None) - except RetrievalError as e2: - raise ValueError(f"Failed to retrieve {schema_id}: {str(e2)}") from e2 + schema_resource = self.context_store.retrieve(schema_id, cross_bucket=False, version=None) + except RetrievalError as e2: + raise ValueError(f"Failed to retrieve {schema_id}: {str(e2)}") from e2 json_dict = as_jsonld( schema_resource,