window/Edit: read digest also from top level response

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@proxmox.com>
This commit is contained in:
Dominik Csapak 2020-05-15 10:19:24 +02:00 committed by Thomas Lamprecht
parent d8f909e10a
commit 8ae2f8c8b1

View File

@ -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 {