diff --git a/magentoerpconnect/unit/binder.py b/magentoerpconnect/unit/binder.py index c54b6fe01..ce1f05090 100644 --- a/magentoerpconnect/unit/binder.py +++ b/magentoerpconnect/unit/binder.py @@ -120,7 +120,9 @@ def bind(self, external_id, binding_id): context = self.session.context.copy() context['connector_no_export'] = True now_fmt = datetime.now().strftime(DEFAULT_SERVER_DATETIME_FORMAT) - assert external_id and binding_id, ( + # the external ID can be 0 on Magento! Prevent False values + # like False, None, or "", but not 0. + assert (external_id or external_id == 0) and binding_id, ( "external_id or binding_id missing, " "got: %s, %s" % (external_id, binding_id) )