Browse Source

Make odml loading and channelview linking more robust.

Julia Sprenger 3 years ago
parent
commit
b11305b3cf
2 changed files with 4 additions and 3 deletions
  1. 3 2
      code/reachgraspio/reachgraspio.py
  2. 1 1
      code/reachgraspio/test_reachgraspio.py

+ 3 - 2
code/reachgraspio/reachgraspio.py

@@ -798,8 +798,9 @@ class ReachGraspIO(BlackrockIO):
         # if views are already created, link them to unit groups
         if view_dict:
             for chid, channel_dict in unit_dict.items():
-                for unit_id, group in channel_dict.items():
-                    group.add(view_dict[chid])
+                if chid in view_dict:
+                    for unit_id, group in channel_dict.items():
+                        group.add(view_dict[chid])
 
     def __create_channel_views(self, block):
         view_dict = {}

+ 1 - 1
code/reachgraspio/test_reachgraspio.py

@@ -1 +1 @@
-/annex/objects/MD5-s4670--b803ed4937604a5c81429080a10d4883
+/annex/objects/MD5-s4878--64070ab5d4f4fed71bf8cb6c4bc53dad