Commit 8e4cc10f authored by Romain Bignon's avatar Romain Bignon Committed by Vincent A

BaseObject: prevent casting id from None to 'None' in constructor

It happens for example in weboob.capabilities.account.Account which
gives None as default value.
parent 7bf9de92
......@@ -419,7 +419,7 @@ class BaseObject(with_metaclass(_BaseObjectMeta, StrConv, object)):
_fields = None
def __init__(self, id=u'', url=NotLoaded, backend=None): = to_unicode(id) = to_unicode(id) if id is not None else u''
self.backend = backend
self._fields = deepcopy(self._fields)
self.__setattr__('url', url)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment