Skip to content

Synchronization with IDs fails

I stumbled upon this during checking #14 (moved), so the scenario (and the system test) is very similar:

  • Insert a file without a parent
  • Create the result of a scan:
    • The same file was found, but a parent RT2 must be added.
    • The file receives an ID that is the same as the ID of the already existing file object.
    • A record needs to be created having the file as value of an obligatory property with type RT2.
  • The crawler synchronizes LinkAhead with the above scan result.

Synchronization leads to the following error:

   def set_id_of_node(self, node: SyncNode, node_id: Optional[str] = None):
# (...)
        if node.id is not None:
>           raise RuntimeError(
                "Cannot update ID.\n"
                f"It already is {node.id} and shall be set to {node_id}."
            )
E           RuntimeError: Cannot update ID.
E           It already is 2240 and shall be set to 2240.

../src/caoscrawler/sync_graph.py:198: RuntimeError

Is this intended?