[pbs-devel] [PATCH proxmox-backup] ui: SyncJobEdit: fix sending 'delete' values on SyncJob creation

Dominik Csapak d.csapak at proxmox.com
Wed Nov 4 11:34:14 CET 2020


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

diff --git a/www/window/SyncJobEdit.js b/www/window/SyncJobEdit.js
index 4edc8cc5..c89b95d2 100644
--- a/www/window/SyncJobEdit.js
+++ b/www/window/SyncJobEdit.js
@@ -68,18 +68,9 @@ Ext.define('PBS.window.SyncJobEdit', {
 		name: 'owner',
 		allowBlank: true,
 		emptyText: 'backup at pam',
-		getSubmitData: function() {
-		    let me = this;
-		    let name = me.getName();
-		    let val = me.getSubmitValue();
-
-		    let data = {};
-		    if (val === null || val === "") {
-			data.delete = name;
-		    } else {
-			data[name] = val;
-		    }
-		    return data;
+		skipEmptyText: true,
+		cbind: {
+		    deleteEmpty: '{!isCreate}',
 		},
 	    },
 	    {
-- 
2.20.1






More information about the pbs-devel mailing list