diff --git a/src/caoscrawler/identifiable_adapters.py b/src/caoscrawler/identifiable_adapters.py index 34b108aafbef0178ae46101460174ef4768ae365..15b006c0fb73f61bb3f65d90d828889c44e734e8 100644 --- a/src/caoscrawler/identifiable_adapters.py +++ b/src/caoscrawler/identifiable_adapters.py @@ -203,14 +203,13 @@ class IdentifiableAdapter(metaclass=ABCMeta): # case A: in the registered identifiable # case B: in the identifiable - if record.get_property(prop.name) is None: - raise NotImplementedError() record_prop = record.get_property(prop.name) if record_prop is None: # TODO: how to handle missing values in identifiables # raise an exception? raise NotImplementedError( - f"RECORD\n{record}\nPROPERTY\n{prop.name}" + f"The following record is missing an identifying property:" + f"RECORD\n{record}\nIdentifying PROPERTY\n{prop.name}" ) newval = record_prop.value record_prop_new = db.Property(name=record_prop.name, @@ -304,9 +303,8 @@ class LocalStorageIdentifiableAdapter(IdentifiableAdapter): with open(filename, "r") as f: self._records = db.Container().from_xml(f.read()) - def is_identifiable_for_record(self, - registered_identifiable: db.RecordType, - record: db.Record): + # TODO: move to super class? + def is_identifiable_for_record(self, registered_identifiable: db.RecordType, record: db.Record): """ Check whether this registered_identifiable is an identifiable for the record.