[pbs-devel] [PATCH proxmox-backup 1/3] ui: form/GroupFilter: correctly resolve the reference cycle

Dominik Csapak d.csapak at proxmox.com
Wed Dec 1 11:57:06 CET 2021


'record[widget]' does not contain anything since the widgets are
in the 'widgets' property so delete that

we also have to remove the 'record' entry of the widget so that
the widget does not have a link to the record anymore

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

diff --git a/www/form/GroupFilter.js b/www/form/GroupFilter.js
index 453152e2..5c75f1d0 100644
--- a/www/form/GroupFilter.js
+++ b/www/form/GroupFilter.js
@@ -10,7 +10,8 @@ Ext.define('PBS.form.GroupFilter', {
 
 	removeReferences: function(record) {
 	    for (const widget of Object.keys(record.widgets || {})) {
-		delete record[widget];
+		delete record.widgets[widget].record;
+		delete record.widgets[widget];
 	    }
 
 	    delete record.widgets;
-- 
2.30.2






More information about the pbs-devel mailing list