From de628b387a930337aa85bb8b732c49277dcb5381 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Wed, 19 Aug 2020 22:31:56 -0500 Subject: [PATCH] Convert CORE-specific version import handler into a mixin class so that we don't have to "choose" it as our final handler --- rattail_corepos/importing/versions.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/rattail_corepos/importing/versions.py b/rattail_corepos/importing/versions.py index 06c1d12..b060d9a 100644 --- a/rattail_corepos/importing/versions.py +++ b/rattail_corepos/importing/versions.py @@ -27,13 +27,12 @@ Rattail -> Rattail "versions" data import from rattail.importing import versions as base -class FromRattailToRattailVersions(base.FromRattailToRattailVersions): +class CoreposVersionMixin(object): """ - Handler for Rattail -> Rattail "versions" data import + Add default registration of custom importers """ - def get_importers(self): - importers = super(FromRattailToRattailVersions, self).get_importers() + def add_corepos_importers(self, importers): importers['CorePerson'] = CorePersonImporter importers['CoreCustomer'] = CoreCustomerImporter importers['CoreMember'] = CoreMemberImporter