diff --git a/addons/payment_authorize/models/authorize_request.py b/addons/payment_authorize/models/authorize_request.py index 922d9df1bf1..e3e65648ee0 100644 --- a/addons/payment_authorize/models/authorize_request.py +++ b/addons/payment_authorize/models/authorize_request.py @@ -226,7 +226,7 @@ class AuthorizeAPI(): etree.SubElement(customer, "email").text = partner.email or '' response = self._authorize_request(root) res = dict() - if not response.find('customerProfileId'): + if response.find('customerProfileId') is None: # Warning: do not use bool(etree) as the semantics is very misleading _logger.warning( 'Unable to create customer payment profile, data missing from transaction. Transaction_id: %s - Partner_id: %s' % (transaction_id, partner)