Skip to content

Commit

Permalink
LITE-28084 Fix item's unit for product clone command
Browse files Browse the repository at this point in the history
  • Loading branch information
bdjilka committed Jul 13, 2023
1 parent b57df81 commit 44e48b8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion connect/cli/plugins/product/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ def cmd_clone_products(config, source_product_id, source_account, destination_ac
)
if name and len(name) > 32:
raise ClickException(
f'New product name can not exceed 32 chracters, provided as name {name}',
f'New product name can not exceed 32 characters, provided as name {name}',
)
if destination_account:
if not config.exists(destination_account):
Expand Down
2 changes: 1 addition & 1 deletion connect/cli/plugins/product/export.py
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ def _fill_item_row(ws, row_idx, item):
ws.cell(row_idx, 5, value=item['description'])
ws.cell(row_idx, 6, value=item['type'])
ws.cell(row_idx, 7, value=item['precision'])
ws.cell(row_idx, 8, value=item['unit']['unit'])
ws.cell(row_idx, 8, value=item['unit']['id'])
period = item.get('period', 'monthly')
if period.startswith('years_'):
period = f'{period.rsplit("_")[-1]} years'
Expand Down
2 changes: 1 addition & 1 deletion tests/plugins/product/test_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -683,7 +683,7 @@ def test_clone_invalid_name(fs, ccli):
)

assert result.exit_code != 0
assert 'New product name can not exceed 32 chracters, provided as name' in result.output
assert 'New product name can not exceed 32 characters, provided as name' in result.output


def test_clone_product_does_not_exist(fs, ccli, mocker, mocked_responses):
Expand Down

0 comments on commit 44e48b8

Please sign in to comment.