From 10c119ea60063c2c4564bd9ea83b167f4d964b58 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Thu, 21 Jan 2021 12:28:01 -0600 Subject: [PATCH] Prevent importing zero as department number, from CORE API --- rattail_corepos/importing/corepos/api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rattail_corepos/importing/corepos/api.py b/rattail_corepos/importing/corepos/api.py index 137b90e..20f67b5 100644 --- a/rattail_corepos/importing/corepos/api.py +++ b/rattail_corepos/importing/corepos/api.py @@ -509,7 +509,7 @@ class ProductImporter(FromCOREPOSAPI, corepos_importing.model.ProductImporter): department_number = None if 'department' in product: - department_number = int(product['department']) + department_number = int(product['department']) or None subdepartment_number = None if 'subdept' in product: