diff --git a/integrationtests/test_realworld_example.py b/integrationtests/test_realworld_example.py index da3fb69ce635ae69cd33cbf01de9df8ebf019661..7360d9670554a039b879ec337b0ed78763d1d589 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 0b1612175c660eb286fe88cd19b2cc293b75025f..735d53a100b4eac18b8a33dcfa18e041b15f9972 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