[pbs-devel] [PATCH proxmox-backup 1/3] ui: tape/BackupOverview: do not iterate over empty tapes

Dominik Csapak d.csapak at proxmox.com
Tue Feb 9 15:40:42 CET 2021


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

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 www/tape/BackupOverview.js | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/www/tape/BackupOverview.js b/www/tape/BackupOverview.js
index 6659d3ff..f4eb6654 100644
--- a/www/tape/BackupOverview.js
+++ b/www/tape/BackupOverview.js
@@ -46,6 +46,9 @@ Ext.define('PBS.TapeManagement.BackupOverview', {
 
 	    for (const entry of content_response.result.data) {
 		let pool = entry.pool;
+		if (pool === undefined) {
+		    continue; // pools not belonging to a pool cannot contain data
+		}
 		let media_set = entry['media-set-name'];
 		if (data[pool] === undefined) {
 		    data[pool] = {};
-- 
2.20.1






More information about the pbs-devel mailing list