[pve-devel] [PATCH 2/3] ext5migrate: do not set a custome idProperty for the KeyValue model

Emmanuel Kasper e.kasper at proxmox.com
Tue Aug 18 09:50:39 CEST 2015


ExtJS refuses with version to have an id set to an empty string, hence we can't
use our "key" property as a custom idProperty (an empty string for key is ok for us, and is used to set back a PVE property to its default value)

We always access the KeyValues entities via their Key property, so this change should be safe.
---
 www/manager5/data/PVEProxy.js | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/www/manager5/data/PVEProxy.js b/www/manager5/data/PVEProxy.js
index 20c1acb..01c20cb 100644
--- a/www/manager5/data/PVEProxy.js
+++ b/www/manager5/data/PVEProxy.js
@@ -61,8 +61,7 @@ Ext.define('PVE.RestProxy', {
 
     Ext.define('KeyValue', {
 	extend: "Ext.data.Model",
-	fields: [ 'key', 'value' ],
-	idProperty: 'key'
+	fields: [ 'key', 'value' ]
     });
 
     Ext.define('KeyValuePendingDelete', {
-- 
2.1.4





More information about the pve-devel mailing list