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.
This commit is contained in:
Adam Young
2011-06-29 13:42:13 -04:00
committed by Endi S. Dewata
parent b8b2ac5357
commit 870e430b65
2 changed files with 8 additions and 1 deletions

View File

@@ -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]);

View File

@@ -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;