From 28f17ca31a00ef84721ee8908815ab28175243be Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Wed, 1 Apr 2020 17:21:25 -0500 Subject: [PATCH] Move a block of code somehow it was stuck right in the middle of some other contiguous blocks, and the sequence just seemed wrong --- .../db/exporters/catapult_inventory.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) 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,