[open-ils-commits] r11731 - trunk/Open-ILS/web/js/dojo/openils
svn at svn.open-ils.org
svn at svn.open-ils.org
Fri Jan 2 15:38:55 EST 2009
Author: miker
Date: 2009-01-02 15:38:51 -0500 (Fri, 02 Jan 2009)
New Revision: 11731
Modified:
trunk/Open-ILS/web/js/dojo/openils/PermaCrud.js
Log:
make sure opts is always an object
Modified: trunk/Open-ILS/web/js/dojo/openils/PermaCrud.js
===================================================================
--- trunk/Open-ILS/web/js/dojo/openils/PermaCrud.js 2009-01-02 20:30:29 UTC (rev 11730)
+++ trunk/Open-ILS/web/js/dojo/openils/PermaCrud.js 2009-01-02 20:38:51 UTC (rev 11731)
@@ -67,6 +67,7 @@
retrieve : function ( fm_class /* Fieldmapper class hint */, id /* Fieldmapper object primary key value */, opts /* Option hash */) {
+ if(!opts) opts = {};
var req_hash = dojo.mixin(
opts,
{ method : 'open-ils.pcrud.retrieve.' + fm_class,
@@ -128,6 +129,7 @@
},
search : function ( fm_class /* Fieldmapper class hint */, search /* Fieldmapper query object */, opts /* Option hash */) {
+ if(!opts) opts = {};
var order_by = {};
if (opts.order_by) order_by.order_by = opts.order_by;
if (opts.select) order_by.select = opts.select;
@@ -157,6 +159,7 @@
},
_CUD : function ( method /* 'create' or 'update' or 'delete' */, list /* Fieldmapper object */, opts /* Option hash */) {
+ if(!opts) opts = {};
if (dojo.isArray(list)) {
if (list.classname) list = [ list ];
@@ -269,6 +272,8 @@
_auto_CUD : function ( list /* Fieldmapper object */, opts /* Option hash */) {
+ if(!opts) opts = {};
+
if (dojo.isArray(list)) {
if (list.classname) list = [ list ];
} else {
More information about the open-ils-commits
mailing list