diff options
-rw-r--r-- | install/ui/src/freeipa/field.js | 4 | ||||
-rw-r--r-- | install/ui/test/aci_tests.js | 16 |
2 files changed, 10 insertions, 10 deletions
diff --git a/install/ui/src/freeipa/field.js b/install/ui/src/freeipa/field.js index 1ae3ddf3e..0bc8c6f5e 100644 --- a/install/ui/src/freeipa/field.js +++ b/install/ui/src/freeipa/field.js @@ -775,8 +775,8 @@ field.Adapter = declare(null, { get_record: function(data) { // detection if it's result or raw RPC command response - // all raw responses should contain `version` and `principal` - if (!data.version || !data.principal) { + // each RPC response should define properties as follows + if (data.id === undefined || data.result === undefined || data.error === undefined) { return data; } diff --git a/install/ui/test/aci_tests.js b/install/ui/test/aci_tests.js index e82dd86df..1cfc2fb4f 100644 --- a/install/ui/test/aci_tests.js +++ b/install/ui/test/aci_tests.js @@ -229,10 +229,10 @@ var get_visible_rows = function(section) { test("Testing type target.", function() { - var data = {}; - data.result = {}; - data.result.result = { - type: 'hostgroup' + var data = { + id: null, + error: null, + result: { result: { type: 'hostgroup'} } }; target_facet.load(data); @@ -266,10 +266,10 @@ test("Testing type target.", function() { test("Testing general target.", function() { - var data = {}; - data.result = {}; - data.result.result = { - extratargetfilter: 'somevalue' + var data = { + id: null, + error: null, + result: { result: { extratargetfilter: 'hostgroup'} } }; target_facet.load(data); |