From 462ec76409df70b61c148e4dab92ceb85c0df505 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20tom=20W=C3=B6rden?= <h.tomwoerden@indiscale.com> Date: Fri, 24 May 2024 21:18:12 +0200 Subject: [PATCH] up --- src/caoscrawler/sync_graph.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/caoscrawler/sync_graph.py b/src/caoscrawler/sync_graph.py index 48bbf9bd..919131b8 100644 --- a/src/caoscrawler/sync_graph.py +++ b/src/caoscrawler/sync_graph.py @@ -286,6 +286,12 @@ class SyncGraph(): Return an equivalent SyncNode. Equivalent means that ID, path or identifiable are the same. + If a new information was added to the given SyncNode (e.g. the ID), it might be possible + then to identify an equivalent node (i.e. one with the same ID in this example). + There might be more than one equivalent nodes in the graph. However, simply the first that + is found is being returned. (When an equivalent node is found this, the given node is + typically merged, into the one that was found and after the merge the graph is again + checked for equivalent nodes) Returns None if no equivalent node is found. """ @@ -565,6 +571,9 @@ class SyncGraph(): # - merge self._add_identifiables_to_dependend_nodes(target) + if self.get_equivalent(target) is not None: + self._merge_into(target, self.get_equivalent(target)) + def _identifiable_is_needed(self, node: SyncNode): """ This function checks: -- GitLab