Skip to content

Commit

Permalink
fix property access after change
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanthorpe committed Oct 14, 2022
1 parent 28870f1 commit da8965c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions partner_tools/cli/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def run_register_device():
'hardwareHash': '',
'productKey': ''
}
client.customer.enroll_devices([device], customer['id'], DEVICE_BATCH_NAME)
client.customer.enroll_devices([device], customer.id, DEVICE_BATCH_NAME)

print()
print('Device was added')
Expand All @@ -60,7 +60,7 @@ def run_get_devices():

customer = get_customer(customers)

devices = client.customer.get_devices(customer['id'], DEVICE_BATCH_NAME)
devices = client.customer.get_devices(customer.id, DEVICE_BATCH_NAME)
print(devices)


Expand Down
4 changes: 2 additions & 2 deletions partner_tools/cli/interactive/common_args.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@


def get_customer(customers: List[Customer]):
choices = [f'{customer["companyProfile"]["companyName"]} - ({customer["id"]})'
choices = [f'{customer.companyProfile.companyName} - ({customer.id})'
for customer in customers]

resp = ask(QuestionType.select,
"Please select a customer:",
choices=choices)

customer = [x for x in customers
if f'{x["companyProfile"]["companyName"]} - ({x["id"]})' == resp][0]
if f'{x.companyProfile.companyName} - ({x.id})' == resp][0]
return customer
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

setup(
name='ms-partner-tools',
version='0.1.0',
version='0.1.1',
author='TechStorm PC',
license='MIT',
classifiers=[
Expand Down

0 comments on commit da8965c

Please sign in to comment.