Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions SoftLayer/managers/storage_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -660,14 +660,14 @@ def prepare_replicant_order_object(manager, snapshot_schedule, location,
"""
# Ensure the primary volume and snapshot space are not set for cancellation
if 'billingItem' not in volume\
or volume['billingItem']['cancellationDate'] != '':
or volume['billingItem'].get('cancellationDate'):
raise exceptions.SoftLayerError(
'This volume is set for cancellation; '
'unable to order replicant volume')

for child in volume['billingItem']['activeChildren']:
if child['categoryCode'] == 'storage_snapshot_space'\
and child['cancellationDate'] != '':
and child.get('cancellationDate'):
raise exceptions.SoftLayerError(
'The snapshot space for this volume is set for '
'cancellation; unable to order replicant volume')
Expand Down