diff --git a/rattail_corepos/corepos/importing/db/exporters/catapult_inventory.py b/rattail_corepos/corepos/importing/db/exporters/catapult_inventory.py index ab41358..f7a1fe5 100644 --- a/rattail_corepos/corepos/importing/db/exporters/catapult_inventory.py +++ b/rattail_corepos/corepos/importing/db/exporters/catapult_inventory.py @@ -329,15 +329,6 @@ class InventoryItemImporter(FromCore, catapult_importing.model.InventoryItemImpo logger("product %s has %s vendorItems but each is missing (valid) vendor: %s", product.upc, len(product.vendor_items), product) - scale_item = product.scale_item - scale_ingredient_text = None - if scale_item: - scale_ingredient_text = scale_item.text - if "\n" in scale_ingredient_text: - log.warning("must remove carriage returns for scale ingredients: %s", - scale_ingredient_text) - scale_ingredient_text = scale_ingredient_text.replace("\n", " ") - if vendor_items: if len(vendor_items) > 1: @@ -376,6 +367,15 @@ class InventoryItemImporter(FromCore, catapult_importing.model.InventoryItemImpo product.upc, len(memo), memo) memo = memo[:254] + scale_item = product.scale_item + scale_ingredient_text = None + if scale_item: + scale_ingredient_text = scale_item.text + if "\n" in scale_ingredient_text: + log.warning("must remove carriage returns for scale ingredients: %s", + scale_ingredient_text) + scale_ingredient_text = scale_ingredient_text.replace("\n", " ") + return { 'item_id': item_id, 'dept_id': department.number,