'delete' is only possible for editing jobs, not creating them

Signed-off-by: Dominik Csapak <d.csa...@proxmox.com>
---
follow up to lukas patches 
 www/manager6/dc/Backup.js | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/www/manager6/dc/Backup.js b/www/manager6/dc/Backup.js
index e1c76a1d..9aae4090 100644
--- a/www/manager6/dc/Backup.js
+++ b/www/manager6/dc/Backup.js
@@ -39,8 +39,10 @@ Ext.define('PVE.dc.BackupEdit', {
            // Get rid of new-old parameters for notification settings.
            // These should only be set for those selected few who ran
            // pve-manager from pvetest.
-           Proxmox.Utils.assemble_field_data(values, { 'delete': 
'notification-policy' });
-           Proxmox.Utils.assemble_field_data(values, { 'delete': 
'notification-target' });
+           if (!isCreate) {
+               Proxmox.Utils.assemble_field_data(values, { 'delete': 
'notification-policy' });
+               Proxmox.Utils.assemble_field_data(values, { 'delete': 
'notification-target' });
+           }
 
            if (!values.id && isCreate) {
                values.id = 'backup-' + 
Ext.data.identifier.Uuid.Global.generate().slice(0, 13);
-- 
2.30.2



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to