Fix refactoring bugs

This commit is contained in:
Lance Edgar 2020-03-17 16:36:31 -05:00
parent cb63644c7d
commit 42184e34b7

View file

@ -65,11 +65,11 @@ class FromCOREAPIToRattail(NewDataSyncImportConsumer):
# normal logic works fine for this (maybe?)
self.invoke_importer(session, change)
else:
# import customer data from API, into various Rattail tables
customer = self.get_host_object(session, change)
# import member data from API, into various Rattail tables
member = self.get_host_object(session, change)
self.process_change(session, self.importers['Customer'],
host_object=customer)
people = self.importers['Person'].get_person_objects_for_customer(customer)
host_object=member)
people = self.importers['Person'].get_person_objects_for_member(member)
for person in people:
self.process_change(session, self.importers['Person'],
host_object=person)