From 1af0ce52d1851a1f6276abdf78e2031a693e3923 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Henrik=20tom=20W=C3=B6rden?= <h.tomwoerden@indiscale.com>
Date: Thu, 4 May 2023 08:36:57 +0200
Subject: [PATCH] correct var name

---
 src/caoscrawler/crawl.py | 2 +-
 unittests/test_tool.py   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/caoscrawler/crawl.py b/src/caoscrawler/crawl.py
index 7d321309..7542a659 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 d0393953..90d10cf7 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:
-- 
GitLab