From d42540d0d17d011e36c4fbc49877f9e6ea6af2d6 Mon Sep 17 00:00:00 2001 From: Daniel <d.hornung@indiscale.com> Date: Thu, 22 Feb 2024 17:13:02 +0100 Subject: [PATCH] MAINT Renaming of variables. --- src/caoscrawler/crawl.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/caoscrawler/crawl.py b/src/caoscrawler/crawl.py index e2b516ac..860f7134 100644 --- a/src/caoscrawler/crawl.py +++ b/src/caoscrawler/crawl.py @@ -730,13 +730,12 @@ class Crawler(object): self.treated_records_lookup.add(record, None) del flat[i] - resolved_references = True + entity_was_treated = True # flat contains Entities which could not yet be checked against the remote server try_to_merge_later = [] - while resolved_references and len(flat) > 0: - resolved_references = False - referencing_entities = self.create_reference_mapping( - all_records) + while entity_was_treated and len(flat) > 0: + entity_was_treated = False + referencing_entities = self.create_reference_mapping(all_records) # For each element we try to find out whether we can find it in the server or whether # it does not yet exist. Since a Record may reference other unkown Records it might not @@ -766,7 +765,7 @@ class Crawler(object): referencing_entities = self.create_reference_mapping(all_records) del flat[i] - resolved_references = True + entity_was_treated = True # 2. Can it be checked on the remote server? elif not self._has_reference_value_without_id(identifiable): @@ -782,7 +781,7 @@ class Crawler(object): record.path = identified_record.path self.treated_records_lookup.add(record, identifiable) del flat[i] - resolved_references = True + entity_was_treated = True # 3. Does it have to be new since a needed reference is missing? # (Is it impossible to check this record because an identifiable references a @@ -790,7 +789,7 @@ class Crawler(object): elif self._has_missing_object_in_references(identifiable, referencing_entities): self.treated_records_lookup.add(record, identifiable) del flat[i] - resolved_references = True + entity_was_treated = True for record in flat: self.replace_references_with_cached(record, referencing_entities) -- GitLab