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',
|
||||
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(
|
||||
'corepos', 'exporting.catapult_inventory.warn_multiple_vendor_items',
|
||||
default=True)
|
||||
|
@ -277,8 +281,9 @@ class InventoryItemImporter(FromCore, catapult_importing.model.InventoryItemImpo
|
|||
if deposit in self.deposits:
|
||||
bottle_deposit = self.deposits[deposit].normal_price
|
||||
else:
|
||||
log.warning("product %s has unknown deposit %s which will be ignored: %s",
|
||||
product.upc, deposit, product)
|
||||
logger = log.warning if self.warn_unknown_deposit else log.debug
|
||||
logger("product %s has unknown deposit %s which will be ignored: %s",
|
||||
product.upc, deposit, product)
|
||||
|
||||
sold_by_ea_or_lb = None
|
||||
if is_plu:
|
||||
|
|
Loading…
Reference in a new issue