Only assign new CORE ID if not in dry run mode

b/c if dry run, we didn't really make the API call so there is no ID
This commit is contained in:
Lance Edgar 2020-08-20 20:18:52 -05:00
parent d3e2619944
commit b96a4bc7b9

View file

@ -317,6 +317,7 @@ class ProductImporter(FromRattail, corepos_importing.model.ProductImporter):
if corepos_product:
# update our Rattail Product with the CORE ID
if not self.dry_run:
product.corepos_id = int(corepos_product['id'])
return corepos_product