Skip to content

Commit d8902f0

Browse files
author
Nathan Beittenmiller
committed
Fixing hardware ordering example syntax
1 parent 52357b3 commit d8902f0

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

SoftLayer/managers/hardware.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -355,12 +355,11 @@ def place_order(self, **kwargs):
355355
'disks': [],
356356
}
357357
358-
for category, item_id in selections:
359-
for item in options['categories'][category]['items']:
358+
for cat, item_id in selections:
359+
for item in options['categories'][cat]['items'].items():
360360
if item['id'] == item_id:
361-
if 'disk' not in category and \
362-
'disk_controller' != category:
363-
args[category] = item['price_id']
361+
if 'disk' not in cat or 'disk_controller' == cat:
362+
args[cat] = item['price_id']
364363
else:
365364
args['disks'].append(item['price_id'])
366365

0 commit comments

Comments
 (0)