diff --git a/src/caoscrawler/crawl.py b/src/caoscrawler/crawl.py
index 7d321309e26ba05abed551d9de13e8f429e0e12d..7542a6592c0abfeb03056ea9ef5f230ecac7564a 100644
--- a/src/caoscrawler/crawl.py
+++ b/src/caoscrawler/crawl.py
@@ -733,7 +733,7 @@ class Crawler(object):
         parent_updates = db.Container()
 
         for entity in to_be_updated:
-            old_entity = cached_get_entity_by(id=entity.id)
+            old_entity = cached_get_entity_by(eid=entity.id)
 
             # Check whether the parents have been changed and add them if missing
             # in the old entity:
diff --git a/unittests/test_tool.py b/unittests/test_tool.py
index d0393953ecca8e6aa0947c691a44c281e049fd8f..90d10cf73235dae5c955ebc46d84218429910dd2 100755
--- a/unittests/test_tool.py
+++ b/unittests/test_tool.py
@@ -588,7 +588,7 @@ def test_replace_entities_with_ids(crawler):
     assert a.get_property("C").value == [12345, 233324]
 
 
-def mock_get_entity_by(id=None, name=None):
+def mock_get_entity_by(eid=None, name=None):
     if id is not None:
         candidates = [el for el in list(full_data.values()) if el.id == id]
         if len(candidates) > 0: