Skip to content

Commit d067000

Browse files
committed
wip: cast int to str for rest nodes
1 parent 3c04294 commit d067000

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/fastcs/transport/rest/rest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ async def attr_get() -> Any: # Must be any as response_model is set
9999

100100
def _add_attribute_api_routes(app: FastAPI, root_controller_api: ControllerAPI) -> None:
101101
for controller_api in root_controller_api.walk_api():
102-
path = controller_api.path
102+
path = [str(node) for node in controller_api.path]
103103

104104
for attr_name, attribute in controller_api.attributes.items():
105105
attr_name = attr_name.replace("_", "-")
@@ -149,7 +149,7 @@ async def command() -> None:
149149

150150
def _add_command_api_routes(app: FastAPI, root_controller_api: ControllerAPI) -> None:
151151
for controller_api in root_controller_api.walk_api():
152-
path = controller_api.path
152+
path = [str(node) for node in controller_api.path]
153153

154154
for name, method in root_controller_api.command_methods.items():
155155
cmd_name = name.replace("_", "-")

0 commit comments

Comments
 (0)