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

MAINT: use special treatment for creating RTs in H5CFood

parent 12d9eff1
No related branches found
No related tags found
1 merge request!22Release 0.3
Pipeline #10553 failed
...@@ -44,7 +44,6 @@ class ExampleH5CFood(H5CFood): ...@@ -44,7 +44,6 @@ class ExampleH5CFood(H5CFood):
super().create_identifiables() super().create_identifiables()
self.identifiable_root = db.Record() self.identifiable_root = db.Record()
self.identifiable_root.add_property("hdf5File", self.crawled_file) self.identifiable_root.add_property("hdf5File", self.crawled_file)
self.identifiable_root.add_parent("ExampleH5")
self.identifiables.append(self.identifiable_root) self.identifiables.append(self.identifiable_root)
def special_treatment(self, key, value, dtype): def special_treatment(self, key, value, dtype):
......
...@@ -259,9 +259,11 @@ class H5CFood(AbstractFileCFood): ...@@ -259,9 +259,11 @@ class H5CFood(AbstractFileCFood):
continue continue
if create_recordTypes and key.lower() not in ['description']: if create_recordTypes and key.lower() not in ['description']:
prop = db.Property(name=key, datatype=dtype) treated_k, _, treated_dtype = special_treatment(
key, val, dtype)
prop = db.Property(name=treated_k, datatype=treated_dtype)
collection.append(prop) collection.append(prop)
rec.add_property(name=key) rec.add_property(name=treated_k)
else: else:
treated_k, treated_v, treated_dtype = special_treatment( treated_k, treated_v, treated_dtype = special_treatment(
key, val, dtype) key, val, dtype)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment