summaryrefslogtreecommitdiffstats
path: root/install/ui/src/freeipa
diff options
context:
space:
mode:
authorPetr Vobornik <pvoborni@redhat.com>2014-09-02 17:11:52 +0200
committerMartin Kosek <mkosek@redhat.com>2014-09-05 15:10:47 +0200
commitc50dff22827cefbb0b0838bf7e9b1e3fcf8752c0 (patch)
tree90122585408ca21279478b69bb85fc18a1899686 /install/ui/src/freeipa
parentdc4bdd327ffffa639877b7d4553810b69943d996 (diff)
downloadfreeipa-c50dff22827cefbb0b0838bf7e9b1e3fcf8752c0.tar.gz
freeipa-c50dff22827cefbb0b0838bf7e9b1e3fcf8752c0.tar.xz
freeipa-c50dff22827cefbb0b0838bf7e9b1e3fcf8752c0.zip
webui: extract complex pkey on Add and Edit
DNS zone 'Add and Edit' failed because of new DNS name encoding. This patch makes sure that keys are extracted properly. https://fedorahosted.org/freeipa/ticket/4520 Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>
Diffstat (limited to 'install/ui/src/freeipa')
-rw-r--r--install/ui/src/freeipa/add.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/install/ui/src/freeipa/add.js b/install/ui/src/freeipa/add.js
index 78f3890ad..7f5c29807 100644
--- a/install/ui/src/freeipa/add.js
+++ b/install/ui/src/freeipa/add.js
@@ -166,12 +166,13 @@ IPA.entity_adder_dialog = function(spec) {
function show_edit_page(entity,result) {
var pkey_name = entity.metadata.primary_key;
var pkey = result[pkey_name];
- if (pkey instanceof Array) {
- pkey = pkey[0];
+ if (!(pkey instanceof Array)) {
+ pkey = [pkey];
}
+ rpc.extract_objects(pkey);
var pkeys = that.pkey_prefix.slice(0);
- pkeys.push(pkey);
+ pkeys.push(pkey[0]);
navigation.show_entity(that.entity.name, 'default', pkeys);
}