diff --git a/attributs.py b/attributs.py index 26d2ad8..60424c0 100644 --- a/attributs.py +++ b/attributs.py @@ -126,7 +126,7 @@ def attrify(val, attr, conn, Parent=None): return val else: attr_classe = AttributeFactory.get(attr, fallback=Attr) - if not isinstance(val, unicode) and (attr_classe.python_type and not isinstance(val, attr_classe.python_type)): + if not isinstance(val, unicode) and not (attr_classe.python_type and isinstance(val, attr_classe.python_type)): cranslib.deprecated.usage("attrify ne devrait ĂȘtre appelĂ© qu'avec des unicode (%r)" % val, level=3) val = val.decode('utf-8') return attr_classe(val, conn, Parent)