diff --git a/addons/website_blog/models/website_blog.py b/addons/website_blog/models/website_blog.py index e1f0803c387..1b7849b3480 100644 --- a/addons/website_blog/models/website_blog.py +++ b/addons/website_blog/models/website_blog.py @@ -195,7 +195,8 @@ class BlogPost(osv.Model): msg_ids = self.pool['mail.message'].search(cr, SUPERUSER_ID, [ ('res_id', '=', id), ('model', '=', self._name), - '|', ('path', 'not in', existing), ('path', '=', False) + ('path', 'not in', existing), + ('path', '!=', False) ], context=context) self.pool['mail.message'].unlink(cr, SUPERUSER_ID, msg_ids, context=context)