Log warning if null byte is detected in size field
This commit is contained in:
parent
c5b1cf01af
commit
16c80082ad
|
@ -220,7 +220,9 @@ class InventoryItemImporter(FromCore, catapult_importing.model.InventoryItemImpo
|
||||||
# TODO: this logic may actually be client-specific? i just happened to
|
# TODO: this logic may actually be client-specific? i just happened to
|
||||||
# find some of these chars in a client DB and needed to avoid them, b/c
|
# find some of these chars in a client DB and needed to avoid them, b/c
|
||||||
# the openpyxl lib said IllegalCharacterError
|
# the openpyxl lib said IllegalCharacterError
|
||||||
if size is not None:
|
if size is not None and '\x00' in size:
|
||||||
|
log.warning("product %s has null byte in size field: %s",
|
||||||
|
product.upc, product)
|
||||||
size = size.replace('\x00', '')
|
size = size.replace('\x00', '')
|
||||||
|
|
||||||
price_divider = None
|
price_divider = None
|
||||||
|
|
Loading…
Reference in a new issue