[FIX] mail: remove useless hasattr on get_base_url

This check was introduced with d82b897ea1 in 12.0 where `get_base_url` was
not yet a model method.

Since f727cd2645, in saas-12.5, that method is now on model, making the
`hasattr` check useless.

closes odoo/odoo#35057

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
This commit is contained in:
Romain Derie
2019-07-24 10:48:53 +00:00
parent 6df11fc42d
commit cfeb8a5185
+1 -1
View File
@@ -2324,7 +2324,7 @@ class MailThread(models.AbstractModel):
params['token'] = token
link = '%s?%s' % (base_link, url_encode(params))
if self and hasattr(self, 'get_base_url'):
if self:
link = self[0].get_base_url() + link
return link