Skip to content

Commit 8da4b60

Browse files
committed
fix(shacl): 🐛 reference owner.graph in get_source_snippet
1 parent 887e2a8 commit 8da4b60

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • rocrate_validator/requirements/shacl

rocrate_validator/requirements/shacl/checks.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,12 +199,12 @@ def get_source_snippet(self) -> Optional[SourceSnippet]:
199199
shacl.target,
200200
)
201201
for predicate in target_predicates:
202-
for triple in graph.triples((owner.node, predicate, None)):
202+
for triple in owner.graph.triples((owner.node, predicate, None)):
203203
subgraph.add(triple)
204204
# follow BNode objects (e.g. sh:target referencing an inline SPARQL target)
205205
_, _, obj = triple
206206
if isinstance(obj, BNode):
207-
subgraph += build_node_subgraph(graph, obj)
207+
subgraph += build_node_subgraph(owner.graph, obj)
208208
# link the owner to the property so the relationship is preserved in the serialization
209209
subgraph.add((owner.node, shacl.property, self._shape.node))
210210

0 commit comments

Comments
 (0)