File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
src/aleph_client/commands/instance Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -345,10 +345,16 @@ def _prepare_allocation_column(self):
345345 color_allocation = "magenta3"
346346 crn_hash = safe_getattr (self .message .content .requirements , "node.node_hash" ) or ""
347347 else :
348- crn_url = self .allocation .allocations .node .url
348+ # Handle the case where allocations.node might be None
349+ node = getattr (self .allocation .allocations , "node" , None )
350+ if node is not None :
351+ crn_url = node .url
352+ crn_hash = node .node_id
353+ else :
354+ crn_url = "N/A"
355+ crn_hash = "N/A"
349356 allocation_str = ALLOCATION_AUTO
350357 color_allocation = "deep_sky_blue1"
351- crn_hash = self .allocation .allocations .node .node_id
352358
353359 # Assemble the complete allocation column
354360 self .allocation_column = cast (
You can’t perform that action at this time.
0 commit comments