Skip to content

Commit

Permalink
fix(convert): use generated cell id if missing
Browse files Browse the repository at this point in the history
  • Loading branch information
Caceresenzo committed Mar 31, 2023
1 parent d130652 commit 4dcaa61
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crunch_cli/command/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
Expand Down

0 comments on commit 4dcaa61

Please sign in to comment.