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['ProductFlag'] = ProductFlagImporter
importers['Employee'] = EmployeeImporter
importers['Customer'] = CustomerImporter
importers['CustData'] = CustDataImporter
importers['MemberType'] = MemberTypeImporter
importers['MemberInfo'] = MemberInfoImporter
importers['HouseCoupon'] = HouseCouponImporter
@ -140,7 +140,7 @@ class ProductFlagImporter(FromCore, corepos_importing.model.ProductFlagImporter)
class EmployeeImporter(FromCore, corepos_importing.model.EmployeeImporter):
pass
class CustomerImporter(FromCore, corepos_importing.model.CustomerImporter):
class CustDataImporter(FromCore, corepos_importing.model.CustDataImporter):
pass
class MemberTypeImporter(FromCore, corepos_importing.model.MemberTypeImporter):

View file

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

View file

@ -102,7 +102,7 @@ class CustomerImporter(FromCOREPOSAPI, importing.model.CustomerImporter):
if customer:
customers[dbcust.card_number] = customer
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",
dbcust.card_number)