Rename the old CORE Customer model, to CustData

it now has a new Customer model, so we use that where we can
This commit is contained in:
Lance Edgar 2020-03-16 16:08:14 -05:00
parent fe986f8e4d
commit 29166f4b1e
3 changed files with 5 additions and 5 deletions

View file

@ -66,7 +66,7 @@ class FromCoreToCoreBase(object):
importers['Product'] = ProductImporter importers['Product'] = ProductImporter
importers['ProductFlag'] = ProductFlagImporter importers['ProductFlag'] = ProductFlagImporter
importers['Employee'] = EmployeeImporter importers['Employee'] = EmployeeImporter
importers['Customer'] = CustomerImporter importers['CustData'] = CustDataImporter
importers['MemberType'] = MemberTypeImporter importers['MemberType'] = MemberTypeImporter
importers['MemberInfo'] = MemberInfoImporter importers['MemberInfo'] = MemberInfoImporter
importers['HouseCoupon'] = HouseCouponImporter importers['HouseCoupon'] = HouseCouponImporter
@ -140,7 +140,7 @@ class ProductFlagImporter(FromCore, corepos_importing.model.ProductFlagImporter)
class EmployeeImporter(FromCore, corepos_importing.model.EmployeeImporter): class EmployeeImporter(FromCore, corepos_importing.model.EmployeeImporter):
pass pass
class CustomerImporter(FromCore, corepos_importing.model.CustomerImporter): class CustDataImporter(FromCore, corepos_importing.model.CustDataImporter):
pass pass
class MemberTypeImporter(FromCore, corepos_importing.model.MemberTypeImporter): class MemberTypeImporter(FromCore, corepos_importing.model.MemberTypeImporter):

View file

@ -92,8 +92,8 @@ class EmployeeImporter(ToCore):
key = 'number' key = 'number'
class CustomerImporter(ToCore): class CustDataImporter(ToCore):
model_class = corepos.Customer model_class = corepos.CustData
key = 'id' key = 'id'

View file

@ -102,7 +102,7 @@ class CustomerImporter(FromCOREPOSAPI, importing.model.CustomerImporter):
if customer: if customer:
customers[dbcust.card_number] = customer customers[dbcust.card_number] = customer
else: else:
logger = log.warning if dbcust.person_number == 1 else log.debug logger = log.warning if dbcust.account_holder else log.debug
logger("could not fetch customer from CORE API: %s", logger("could not fetch customer from CORE API: %s",
dbcust.card_number) dbcust.card_number)