From 257aad68af316097f2c40a5682ecb285a2875e56 Mon Sep 17 00:00:00 2001 From: Maxime Jublou Date: Tue, 19 Sep 2023 14:51:45 +0200 Subject: [PATCH] fix: Working on few fixes --- .../domains/space/adaptors/primary/TyperSpaceAdaptor.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/naas_python/domains/space/adaptors/primary/TyperSpaceAdaptor.py b/naas_python/domains/space/adaptors/primary/TyperSpaceAdaptor.py index 4f13dbe..2b087d4 100644 --- a/naas_python/domains/space/adaptors/primary/TyperSpaceAdaptor.py +++ b/naas_python/domains/space/adaptors/primary/TyperSpaceAdaptor.py @@ -90,7 +90,7 @@ def create( image: str = typer.Option(..., "--image", help="Image of the space"), domain: str = typer.Option("", "--domain", "-d", help="Domain of the space"), env: str = typer.Option( - None, + {}, "--env", help="Environment variables for the Space container", ), @@ -258,6 +258,7 @@ def list( space_list = self.domain.list(page_size=page_size, page_number=page_number) data = [] + headers = [] # Extract the data and headers for space in space_list.spaces: @@ -271,7 +272,7 @@ def list( data.append(list(_space_dict.values())) # Append a list of values to data - headers = [key.upper() for key in _space_dict.keys()] + headers = [key.upper() for key in _space_dict.keys()] if len(data) == 0: print("No matching results found.")