From e276fc0ef1a81632a2b2abb3c40b968a968aefc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20tom=20W=C3=B6rden?= <h.tomwoerden@indiscale.com> Date: Thu, 23 Mar 2023 16:19:48 +0100 Subject: [PATCH] FIX: correct the variable used; and better exception message --- src/caoscrawler/crawl.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/caoscrawler/crawl.py b/src/caoscrawler/crawl.py index c77dcee1..40e3830e 100644 --- a/src/caoscrawler/crawl.py +++ b/src/caoscrawler/crawl.py @@ -712,7 +712,7 @@ class Crawler(object): # TODO: can the following be removed at some point for ent in flat: if ent.role == "Record" and len(ent.parents) == 0: - raise RuntimeError("Records must have a parent.") + raise RuntimeError(f"Records must have a parent.\n{ent}") resolved_references = True # flat contains Entities which could not yet be checked against the remote server @@ -1023,7 +1023,7 @@ class Crawler(object): to_be_updated = self.remove_unnecessary_updates(to_be_updated, identified_records) logger.info(f"Going to insert {len(to_be_inserted)} Entities and update " - f"{len(to_be_inserted)} Entities.") + f"{len(to_be_updated)} Entities.") if commit_changes: self.execute_parent_updates_in_list(to_be_updated, securityMode=self.securityMode, run_id=self.run_id, unique_names=unique_names) -- GitLab