From 8b0f8a09927254e0cb7e7e1ae1deb83ff2d78b34 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Mon, 23 Jul 2012 15:52:15 +0200 Subject: [PATCH] [IMP] replace equality None test by identity test bzr revid: xmo@openerp.com-20120723135215-7n63uh4ikulsdc6r --- openerp/osv/fields.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openerp/osv/fields.py b/openerp/osv/fields.py index 3117793dcab..6c74c05bd5a 100644 --- a/openerp/osv/fields.py +++ b/openerp/osv/fields.py @@ -49,7 +49,7 @@ import simplejson _logger = logging.getLogger(__name__) def _symbol_set(symb): - if symb == None or symb == False: + if symb is None or symb == False: return None elif isinstance(symb, unicode): return symb.encode('utf-8') @@ -191,7 +191,7 @@ class char(_column): # * we need to remove the "symb==False" from the next line BUT # for now too many things rely on this broken behavior # * the symb==None test should be common to all data types - if symb == None or symb == False: + if symb is None or symb == False: return None # we need to convert the string to a unicode object to be able