diff --git a/crunch_cli/command/convert.py b/crunch_cli/command/convert.py index 7afe2d2..939e7f6 100644 --- a/crunch_cli/command/convert.py +++ b/crunch_cli/command/convert.py @@ -13,8 +13,8 @@ def convert_cells(cells: typing.List[typing.Any]): module = ast.Module() module.body = [] - for cell in cells: - cell_id = cell["metadata"]["id"] + for index, cell in enumerate(cells): + cell_id = cell["metadata"].get("id") or f"cell_{index}" def log(message): print(f"convert {cell_id} {message}")