From ee37bd5442b01deddff162539b6f828c77bade59 Mon Sep 17 00:00:00 2001
From: Adam Young <[email protected]>
Date: Wed, 29 Jun 2011 13:42:13 -0400
Subject: [PATCH] undefined pkeys https://fedorahosted.org/freeipa/ticket/1399
Thereis not metatdata defined pkey for config, so we need to short circuit the logic that uses the metatdata pkey to look up the key from the hashurl.
---
install/ui/details.js | 3 +++
install/ui/entity.js | 6 +++++-
2 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/install/ui/details.js b/install/ui/details.js
index afab5a7e7449b844351a44b806c7e381f09e4b7c..17f9ab5ac4f6ac67c475c66b90ec7c5992a631fb 100644
--- a/install/ui/details.js
+++ b/install/ui/details.js
@@ -325,6 +325,9 @@ IPA.details_facet = function(spec) {
pkey.push(that.pkey);
} else {
var pkey_name = IPA.metadata.objects[that.entity_name].primary_key;
+ if (!pkey_name){
+ return pkey;
+ }
var pkey_val = that.data[pkey_name];
if (pkey_val instanceof Array) {
pkey.push(pkey_val[0]);
diff --git a/install/ui/entity.js b/install/ui/entity.js
index c04f85d6de4815c9707513d787cadc85e361ce23..985f7136fa1280c41771c68c96c56d25b35c0383 100644
--- a/install/ui/entity.js
+++ b/install/ui/entity.js
@@ -584,7 +584,11 @@ IPA.entity = function (spec) {
var current_entity = that;
current_entity = current_entity.containing_entity;
while(current_entity !== null){
- pkey.unshift(IPA.nav.get_state(current_entity.name+'-pkey'));
+
+ var key = IPA.nav.get_state(current_entity.name+'-pkey');
+ if (key){
+ pkey.unshift(key);
+ }
current_entity = current_entity.containing_entity;
}
return pkey;
--
1.7.5.2
_______________________________________________
Freeipa-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/freeipa-devel