diff --git a/src/resources/cinder/backup.jsx b/src/resources/cinder/backup.jsx index 15c97c70..9075114b 100644 --- a/src/resources/cinder/backup.jsx +++ b/src/resources/cinder/backup.jsx @@ -169,8 +169,10 @@ export const getAdd = (cinderQuota) => { const { left = 0 } = backups || {}; const { left: sizeLeft = 0, limit } = gigabytes || {}; const { currentVolumeSize = 0 } = globalBackupStore; - const add = - left !== 0 && (limit === -1 || sizeLeft >= currentVolumeSize) ? 1 : 0; + const leftOk = left !== 0; + const sizeOk = + sizeLeft !== 0 && (limit === -1 || sizeLeft >= currentVolumeSize); + const add = leftOk && sizeOk ? 1 : 0; return { add, addSize: add === 1 ? currentVolumeSize : 0,