diff --git a/src/caoscrawler/identifiable_adapters.py b/src/caoscrawler/identifiable_adapters.py index 6169a99e7bf47daffb53332b7e0b6513730f2561..444b73f5d9a42cf8ec23eec7cb718b1fc183dd30 100644 --- a/src/caoscrawler/identifiable_adapters.py +++ b/src/caoscrawler/identifiable_adapters.py @@ -672,11 +672,15 @@ class CaosDBIdentifiableAdapter(IdentifiableAdapter): registered = [] for parent in rt.parents: prt = _retrieve_RecordType(id=parent.id, name=parent.name) - registered.append(self._get_registered_for_rt(prt)) + reg = self._get_registered_for_rt(prt) + if reg is not None: + registered.append(reg) # TODO we might in future want to check whether the registered identifiables are the same if len(registered) > 1: - raise RuntimeError("Multiple registered identifiables found for the RecordType " - f" {rt.name} with the following parents: {rt.parents}") + ri_names = [i.name for i in registered] + raise RuntimeError(f"Multiple registered identifiables found for the RecordType " + f" {rt.name} with the following parents: {rt.parents}\n" + f"Registered identifiables: {', '.join(ri_names)}") elif len(registered) == 1: return registered[0] else: