Besides being trivially more efficient, this avoids a situation
where pcrud can sometimes time out when attempting to retrieve
a row by a null PK value.
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
git-svn-id: svn://svn.open-ils.org/ILS/trunk@18784
dcc99617-32d9-48b4-a31d-
7c20da2025e4
// the *onItem* callback from the *keywordArgs* object. If we
// tried to retrieve the item with pcrud but didn't get an item
// back, issue the *onError* callback.
+ if (keywordArgs.identity == undefined)
+ return null; // Identity API spec unclear whether error callback
+ // would need to be run, so we won't. Matters
+ // because in some cases pcrud times out when attempting
+ // to retrieve by a null PK value
var callback_scope = keywordArgs.scope || dojo.global;
var test_item = this._stored_items[keywordArgs.identity];