Fixed bug preventing deleting robots

This commit is contained in:
Alex Davies 2024-11-07 10:03:14 -04:00
parent b8a353b9af
commit 4ae96ff8b9
1 changed files with 2 additions and 1 deletions

View File

@ -105,7 +105,7 @@ class Robot:
async def delete_robot(): async def delete_robot():
await self.async_stop() await self.async_stop()
robots.remove(self) robots.remove(self)
element.remove(robot_ui) element.remove(self.robot_ui)
ui.button("Delete", on_click=delete_robot).classes("m-2") ui.button("Delete", on_click=delete_robot).classes("m-2")
with ui.tabs() as tabs: with ui.tabs() as tabs:
tab_containers = ui.tab('Containers') tab_containers = ui.tab('Containers')
@ -116,6 +116,7 @@ class Robot:
async def async_stop(self): async def async_stop(self):
return await run.io_bound(self.stop) return await run.io_bound(self.stop)
def stop(self): def stop(self):
#Signal all processes to stop #Signal all processes to stop
for process in self.processes: for process in self.processes: