Add False check when do _retype_error
Do a false check when the reservations is None or en empty list.
@@ -2684,7 +2684,9 @@ class VolumeManager(manager.CleanableManager,
volume.update(status_update)
volume.save()
finally:
+ if old_reservations:
QUOTAS.rollback(context, old_reservations)
+ if new_reservations:
QUOTAS.rollback(context, new_reservations)
status_update = {'status': volume.previous_status}
