From 6e1d2544c8acb3752fe9a92677f7efd5062b87b8 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Tue, 19 Sep 2023 06:49:30 -0500 Subject: [PATCH] Fix bug when fetching corepos handler --- rattail_corepos/batch/vendorcatalog.py | 2 +- rattail_corepos/importing/corepos/api.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rattail_corepos/batch/vendorcatalog.py b/rattail_corepos/batch/vendorcatalog.py index 2f8de57..d90146e 100644 --- a/rattail_corepos/batch/vendorcatalog.py +++ b/rattail_corepos/batch/vendorcatalog.py @@ -72,7 +72,7 @@ class VendorCatalogHandler(base.VendorCatalogHandler): if not vendor_id: raise ValueError("Batch vendor does not have valid CORE-POS ID") - self.api = self.get_corepos_handler.make_webapi() + self.api = self.app.get_corepos_handler.make_webapi() self.update_corepos(batch, rows, vendor_id, progress=progress, # update_product_costs=kwargs.get('update_product_costs', False), ) diff --git a/rattail_corepos/importing/corepos/api.py b/rattail_corepos/importing/corepos/api.py index 1ebb3d2..7333223 100644 --- a/rattail_corepos/importing/corepos/api.py +++ b/rattail_corepos/importing/corepos/api.py @@ -99,7 +99,7 @@ class FromCOREPOSAPI(importing.Importer): self.establish_api() def establish_api(self): - self.api = self.get_corepos_handler().make_webapi() + self.api = self.app.get_corepos_handler().make_webapi() def should_ignore_new_members(self): if hasattr(self, 'ignore_new_members'):