diff --git a/src/caoscrawler/identifiable_adapters.py b/src/caoscrawler/identifiable_adapters.py index e694178e5d17f93a3de2784e13c3a7e3e300de55..52596016629334acb9f52dec5077c6e93d71fa2f 100644 --- a/src/caoscrawler/identifiable_adapters.py +++ b/src/caoscrawler/identifiable_adapters.py @@ -197,6 +197,8 @@ class IdentifiableAdapter(metaclass=ABCMeta): "Multi properties used in identifiables could cause unpredictable results and are" " not allowed. You might want to consider a Property with a list as value.") + # use the RecordType of the registred Identifiable if it exists + # We do not use parents of Record because it might have multiple return Identifiable(record_type=(registered_identifiable.parents[0].name if registered_identifiable else None), name=record.name, @@ -414,6 +416,7 @@ class CaosDBIdentifiableAdapter(IdentifiableAdapter): """ if len(record.parents) == 0: return None + # TODO We need to treat the case where multiple parents exist properly. rt_name = record.parents[0].name for name, definition in self._registered_identifiables.items(): if definition.parents[0].name.lower() == rt_name.lower():