[FIX] handling of _count in queries: it can be 0, which is valid but falsy

bzr revid: xmo@openerp.com-20120306161358-py6zz2bts9b3cb1x
This commit is contained in:
Xavier Morel 2012-03-06 17:13:58 +01:00
parent 075ac184f8
commit 8b13a99967
1 changed files with 1 additions and 1 deletions

View File

@ -98,7 +98,7 @@ openerp.web.Query = openerp.web.Class.extend({
* @returns {jQuery.Deferred<Number>}
*/
count: function () {
if (this._count) { return $.when(this._count); }
if (this._count != undefined) { return $.when(this._count); }
return this._model.call(
'search_count', [this._filter], {
context: this._model.context(this._context)});