Skip to content
Snippets Groups Projects
Commit 2c57c5e6 authored by Henrik tom Wörden's avatar Henrik tom Wörden
Browse files

wip

parent b60ece3a
Branches
Tags
2 merge requests!91Release 0.3,!67MAINT: introduce an identifiable class
......@@ -161,23 +161,13 @@ class IdentifiableAdapter(metaclass=ABCMeta):
identifiable
"""
path = None
if record.role == "File":
path = record.path
registered_identifiable = self.get_registered_identifiable(record)
if registered_identifiable is None:
if path is not None:
return Identifiable(path=path)
return None
if len(registered_identifiable.parents) != 1:
raise RuntimeError("Multiple parents for identifiables"
"not supported.")
property_name_list_A = []
property_name_list_B = []
identifiable_props = {}
if registered_identifiable is not None:
# fill the values:
for prop in registered_identifiable.properties:
if prop.name == "name":
......@@ -210,7 +200,7 @@ class IdentifiableAdapter(metaclass=ABCMeta):
return Identifiable(record_type=registered_identifiable.parents[0].name,
name=record.name,
properties=identifiable_props,
path=path
path=record.path
)
@abstractmethod
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment