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
--
Petr Vobornik
From 686ac549bf92822a9c9692e58a89e41665faab08 Mon Sep 17 00:00:00 2001
From: Petr Vobornik <pvobo...@redhat.com>
Date: Tue, 2 Sep 2014 17:11:52 +0200
Subject: [PATCH] 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
---
 install/ui/src/freeipa/add.js | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/install/ui/src/freeipa/add.js b/install/ui/src/freeipa/add.js
index 78f3890ad2320cbc3afd5cb9ae1e4ae2359d8023..7f5c29807bae8cc9db00e4e826a68facd1e5758a 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);
     }
 
-- 
1.9.3

_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Reply via email to