From 55a207932b4cd17695284d3efa16634d259ff0e5 Mon Sep 17 00:00:00 2001 From: Luka van der Plas Date: Wed, 11 Dec 2024 17:15:01 +0100 Subject: [PATCH] clarity --- backend/collect/graphs.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/backend/collect/graphs.py b/backend/collect/graphs.py index e1ebcf3a..0cd435b4 100644 --- a/backend/collect/graphs.py +++ b/backend/collect/graphs.py @@ -23,7 +23,7 @@ def list_to_graph_collection(items: List[Node], items_node: IdentifiedNode) -> G g = Graph() collection = g.collection(items_node) - collection += items + collection += items # indirectly modifies g return g @@ -32,7 +32,9 @@ def collection_triples(graph: Graph, list_node: IdentifiedNode) -> Triples: Select all triples that make up an RDF collection in a graph. This collects the chain of `rdf:first` / `rdf:rest` relations that make up the - collection. + collection. It collects what is actually stored in the graph, rather than a + normalised version, so this method should be used to select the current triples in + a delete or update operation. ''' triples = list(graph.triples((list_node, RDF.first, None)))