Convert CORE-specific version import handler into a mixin class

so that we don't have to "choose" it as our final handler
This commit is contained in:
Lance Edgar 2020-08-19 22:31:56 -05:00
parent 6dbf7cf174
commit de628b387a

View file

@ -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