From 84040dfcab4214133ae14b2a4cd026ceba3ec731 Mon Sep 17 00:00:00 2001 From: Ilnur Gallyamov Date: Wed, 13 May 2015 14:16:22 +0500 Subject: [PATCH] simple code --- models.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/models.py b/models.py index a7ab8c4..bb6f741 100644 --- a/models.py +++ b/models.py @@ -17,7 +17,6 @@ class res_partner_strip_email(models.Model): return super(res_partner_strip_email, self).create(vals) def _check_email_field(self, vals): - if not isinstance(vals['email'], bool) and 'email' in vals or \ - isinstance(vals['email'], bool) and vals['email']: + if vals.get('email'): vals['email'] = vals['email'].strip() return vals