Skip to content

Commit 7aa2a8e

Browse files
authored
Merge pull request #529 from necusjz/fix-add-subcommands
fix: add subcommands failure
2 parents bd47939 + 76dbbda commit 7aa2a8e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/aaz_dev/command/controller/workspace_manager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -945,7 +945,7 @@ def list_commands_by_subresource(self, resource_id, version, subresource):
945945

946946
def _build_command_tree_leaf_from_aaz_ref(self, parent, name, aaz_ref):
947947
cmd_names = [*parent.names, name]
948-
if (ref_v_name := aaz_ref.get(' '.join(cmd_names), None)) \
948+
if aaz_ref and (ref_v_name := aaz_ref.get(' '.join(cmd_names), None)) \
949949
and (aaz_leaf := self.aaz_specs.find_command(*cmd_names)):
950950
# reference from aaz specs
951951
ref_v = None

0 commit comments

Comments
 (0)