[IMP] make Query#order_by more resilient to somebody passing 'undefined'
bzr revid: xmo@openerp.com-20120306150945-86358u7atgyevb52
This commit is contained in:
@@ -185,6 +185,7 @@ openerp.web.Query = openerp.web.Class.extend({
|
||||
* @returns {openerp.web.Query}
|
||||
*/
|
||||
order_by: function (fields) {
|
||||
if (fields === undefined) { return this; }
|
||||
if (!(fields instanceof Array)) {
|
||||
fields = _.toArray(arguments);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user