[FIX] Fixed previous fix: where clause might be empty.
bzr revid: jth@openerp.com-20100804155117-gazy6gibbyk01wqz
This commit is contained in:
+4
-1
@@ -3823,7 +3823,10 @@ class orm(orm_template):
|
||||
offset_str = offset and ' offset %d' % offset or ''
|
||||
|
||||
where.extend(qu1_join)
|
||||
where_str = " WHERE %s" % " AND ".join(where)
|
||||
if where:
|
||||
where_str = " WHERE %s" % " AND ".join(where)
|
||||
else:
|
||||
where_str = ""
|
||||
|
||||
if count:
|
||||
cr.execute('select count(%s.id) from ' % self._table +
|
||||
|
||||
Reference in New Issue
Block a user