From 4044ac18c852d93c7860b9640784777a2088c293 Mon Sep 17 00:00:00 2001
From: florian <f.spreckelsen@inidscale.com>
Date: Tue, 12 Sep 2023 17:35:03 +0200
Subject: [PATCH] DRAFT: Add fix for weird PANGAEA crawler issue

---
 src/caoscrawler/crawl.py | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/caoscrawler/crawl.py b/src/caoscrawler/crawl.py
index 97393ef3..56a7d8ca 100644
--- a/src/caoscrawler/crawl.py
+++ b/src/caoscrawler/crawl.py
@@ -644,7 +644,14 @@ class Crawler(object):
                     resolved_references = True
 
             for record in flat:
-                self.replace_references_with_cached(record, referencing_entities)
+                try:
+                    self.replace_references_with_cached(record, referencing_entities)
+                except RuntimeError as re:
+                    # TODO: This resolves
+                    # https://gitlab.indiscale.com/caosdb/customers/leibniz-zmt/management/-/issues/258,
+                    # but why?
+                    print(f"{record=}\n")
+                    continue
 
         if len(flat) > 0:
             circle = self.detect_circular_dependency(flat)
-- 
GitLab