[FIX] website_mail: useless and expensive DISTINCT
bzr revid: odo@openerp.com-20140129162532-os3lzjyf87hg1ouc
This commit is contained in:
parent
0ac11b430f
commit
a09fa10c49
|
@ -56,7 +56,7 @@ class MailMessage(osv.Model):
|
|||
group_ids = self.pool.get('res.users').browse(cr, uid, uid, context=context).groups_id
|
||||
group_user_id = self.pool.get("ir.model.data").get_object_reference(cr, uid, 'base', 'group_public')[1]
|
||||
if group_user_id in [group.id for group in group_ids]:
|
||||
cr.execute('SELECT DISTINCT id FROM "%s" WHERE website_published IS FALSE AND id = ANY (%%s)' % (self._table), (ids,))
|
||||
cr.execute('SELECT id FROM "%s" WHERE website_published IS FALSE AND id = ANY (%%s)' % (self._table), (ids,))
|
||||
if cr.fetchall():
|
||||
raise osv.except_osv(
|
||||
_('Access Denied'),
|
||||
|
|
Loading…
Reference in New Issue