ui: tape/BackupOverview: do not iterate over empty tapes

tapes not belonging to a pool cannot contain data, so skip them

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
Dominik Csapak 2021-02-09 15:40:42 +01:00 committed by Dietmar Maurer
parent befd95a90a
commit 3ddbab6193
1 changed files with 3 additions and 0 deletions

View File

@ -46,6 +46,9 @@ Ext.define('PBS.TapeManagement.BackupOverview', {
for (const entry of content_response.result.data) { for (const entry of content_response.result.data) {
let pool = entry.pool; let pool = entry.pool;
if (pool === undefined) {
continue; // pools not belonging to a pool cannot contain data
}
let media_set = entry['media-set-name']; let media_set = entry['media-set-name'];
if (data[pool] === undefined) { if (data[pool] === undefined) {
data[pool] = {}; data[pool] = {};