Update various warnings to use product upc

This commit is contained in:
Lance Edgar 2020-03-30 11:33:39 -05:00
parent 45f05032fb
commit 6dc65f1aa5

View file

@ -142,12 +142,12 @@ class InventoryItemImporter(FromCore, catapult_importing.model.InventoryItemImpo
return
if not item_id.isdigit():
log.debug("product has non-numeric upc %s: %s",
item_id, product)
log.debug("product %s has non-numeric upc: %s",
product.upc, product)
return
if self.ignored_upcs and item_id in self.ignored_upcs:
log.debug("ignoring UPC %s for product: %s", item_id, product)
log.debug("ignoring UPC %s for product: %s", product.upc, product)
return
is_plu = False
@ -167,7 +167,7 @@ class InventoryItemImporter(FromCore, catapult_importing.model.InventoryItemImpo
department = product.department
if not department:
logger = log.warning if self.warn_missing_department else log.debug
logger("item_id %s has no department: %s", item_id, product)
logger("product %s has no department: %s", product.upc, product)
return
price_divider = None
@ -176,7 +176,7 @@ class InventoryItemImporter(FromCore, catapult_importing.model.InventoryItemImpo
diff = (product.quantity * product.normal_price) - product.group_price
if abs(round(diff, 2)) > .01:
log.warning("product %s has multi-price with $%0.2f diff: %s",
item_id, diff, product)
product.upc, diff, product)
price_divider = product.quantity
sold_by_ea_or_lb = None