[pve-devel] [PATCH widget-toolkit 1/3] window/Edit: read digest also from top level response

Dominik Csapak d.csapak at proxmox.com
Fri May 15 10:19:24 CEST 2020


we want to have the digest in the top level object, like:
{
    data: { /* the real data */ },
    digest: "fa123asf123123123", // the digest
}

instead of in the data itself, so read it preferably from there
(with fallback to stay compatible)

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 window/Edit.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/window/Edit.js b/window/Edit.js
index d21c165..6e6c0d4 100644
--- a/window/Edit.js
+++ b/window/Edit.js
@@ -192,7 +192,7 @@ Ext.define('Proxmox.window.Edit', {
 		method: 'GET',
 		success: function(response, opts) {
 		    form.clearInvalid();
-		    me.digest = response.result.data.digest;
+		    me.digest = response.result.digest || response.result.data.digest;
 		    if (successFn) {
 			successFn(response, opts);
 		    } else {
-- 
2.20.1





More information about the pve-devel mailing list