From 976ab1140b39081113bcd8992e0c888ee73ef6ab Mon Sep 17 00:00:00 2001 From: George O'Neill Date: Wed, 13 Sep 2023 14:39:58 +0200 Subject: [PATCH] Adjusted so depends_on of len 1 are read correctly --- nexus_constructor/json/load_from_json.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nexus_constructor/json/load_from_json.py b/nexus_constructor/json/load_from_json.py index 847a46aa7..76363d9ad 100644 --- a/nexus_constructor/json/load_from_json.py +++ b/nexus_constructor/json/load_from_json.py @@ -401,8 +401,8 @@ def _add_transform_and_shape_to_component(self, component, children_dict): if depends_on not in DEPENDS_ON_IGNORE: if depends_on[0] != "/": # we are always in the NXtransformations group but the path could be anything - if len(depends_on.split("/")) == 2: - depends_on = "transformations/" + depends_on.split("/")[1] + if len(depends_on.split("/")) <= 2: + depends_on = "transformations/" + depends_on.split("/")[-1] depends_on = component.absolute_path + depends_on depends_on_id = TransformId(*get_component_and_transform_name(depends_on)) self._components_depends_on[component.name] = (component, depends_on_id)