Allow suppression of logging for unknown bottle deposits
This commit is contained in:
parent
aefaaf8351
commit
7e450e11b1
|
@ -141,6 +141,10 @@ class InventoryItemImporter(FromCore, catapult_importing.model.InventoryItemImpo
|
||||||
'corepos', 'exporting.catapult_inventory.warn_size_null_byte',
|
'corepos', 'exporting.catapult_inventory.warn_size_null_byte',
|
||||||
default=True)
|
default=True)
|
||||||
|
|
||||||
|
self.warn_unknown_deposit = self.config.getbool(
|
||||||
|
'corepos', 'exporting.catapult_inventory.warn_unknown_deposit',
|
||||||
|
default=True)
|
||||||
|
|
||||||
self.warn_multiple_vendor_items = self.config.getbool(
|
self.warn_multiple_vendor_items = self.config.getbool(
|
||||||
'corepos', 'exporting.catapult_inventory.warn_multiple_vendor_items',
|
'corepos', 'exporting.catapult_inventory.warn_multiple_vendor_items',
|
||||||
default=True)
|
default=True)
|
||||||
|
@ -277,8 +281,9 @@ class InventoryItemImporter(FromCore, catapult_importing.model.InventoryItemImpo
|
||||||
if deposit in self.deposits:
|
if deposit in self.deposits:
|
||||||
bottle_deposit = self.deposits[deposit].normal_price
|
bottle_deposit = self.deposits[deposit].normal_price
|
||||||
else:
|
else:
|
||||||
log.warning("product %s has unknown deposit %s which will be ignored: %s",
|
logger = log.warning if self.warn_unknown_deposit else log.debug
|
||||||
product.upc, deposit, product)
|
logger("product %s has unknown deposit %s which will be ignored: %s",
|
||||||
|
product.upc, deposit, product)
|
||||||
|
|
||||||
sold_by_ea_or_lb = None
|
sold_by_ea_or_lb = None
|
||||||
if is_plu:
|
if is_plu:
|
||||||
|
|
Loading…
Reference in a new issue