diff --git a/nexus_constructor/json/transformation_reader.py b/nexus_constructor/json/transformation_reader.py index bb7086667..9fd90c7af 100644 --- a/nexus_constructor/json/transformation_reader.py +++ b/nexus_constructor/json/transformation_reader.py @@ -306,7 +306,7 @@ def _create_transformations(self, json_transformations: list): depends_on = _find_attribute_from_list_or_dict( CommonAttrs.DEPENDS_ON, attributes ) - if depends_on not in [".", ""]: + if depends_on not in [".", "", None]: if depends_on[0] != "/": depends_on = self.parent_component.absolute_path + "/transformations/" + depends_on diff --git a/tests/json/test_transformation_reader.py b/tests/json/test_transformation_reader.py index 70565c250..c4b9d6847 100644 --- a/tests/json/test_transformation_reader.py +++ b/tests/json/test_transformation_reader.py @@ -128,6 +128,7 @@ def attributes_list(transformation_json): def transformation_reader(transformation_json): parent_component = Mock(spec=Component) parent_component.name = PARENT_COMPONENT_NAME + parent_component.absolute_path = "/entry/" + parent_component.name entry = [transformation_json] transforms_with_dependencies: Dict[ TransformId, Tuple[Transformation, TransformId]