From 228e09a9bb8c03aaed0f50412e0b5a3a2881a7b1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Henrik=20tom=20W=C3=B6rden?= <h.tomwoerden@indiscale.com>
Date: Sun, 16 Oct 2022 15:27:33 +0200
Subject: [PATCH] fix

---
 integrationtests/test_realworld_example.py | 14 +-------------
 src/caoscrawler/crawl.py                   |  5 ++---
 2 files changed, 3 insertions(+), 16 deletions(-)

diff --git a/integrationtests/test_realworld_example.py b/integrationtests/test_realworld_example.py
index da3fb69c..7360d967 100644
--- a/integrationtests/test_realworld_example.py
+++ b/integrationtests/test_realworld_example.py
@@ -83,19 +83,7 @@ def clear_database():
 
 def create_identifiable_adapter():
     ident = CaosDBIdentifiableAdapter()
-    ident.register_identifiable("license", (
-        db.RecordType()
-        .add_parent("license")
-        .add_property("name")))
-    ident.register_identifiable("project_type", (
-        db.RecordType()
-        .add_parent("project_type")
-        .add_property("name")))
-    ident.register_identifiable("Person", (
-        db.RecordType()
-        .add_parent("Person")
-        .add_property("full_name")))
-
+    ident.load_from_yaml_definition(os.path.join(DATADIR, "identifiables.yml"))
     return ident
 
 
diff --git a/src/caoscrawler/crawl.py b/src/caoscrawler/crawl.py
index 0b161217..735d53a1 100644
--- a/src/caoscrawler/crawl.py
+++ b/src/caoscrawler/crawl.py
@@ -536,8 +536,7 @@ class Crawler(object):
         returns true if all references either have IDs or were checked remotely and not found (i.e.
         they exist in the local cache)
         """
-        identifiable = self.identifiableAdapter.get_identifiable(record)
-        for p in identifiable.properties:
+        for p in record.properties:
             # if (is_reference(p)
             # Entity instead of ID and not cached locally
             if (isinstance(p.value, list)):
@@ -690,7 +689,7 @@ class Crawler(object):
 
                     del flat[i]
 
-                # all references need to be IDs that exist on the remote server
+                # all identifying references need to be IDs that exist on the remote server
                 elif self.can_be_checked_externally(record):
 
                     # Check remotely
-- 
GitLab