Change how we import Member.id from CORE

to match what we do for `Customer.id`
This commit is contained in:
Lance Edgar 2020-03-18 12:37:18 -05:00
parent 6e51f36fc5
commit 154722b78d

View file

@ -480,10 +480,10 @@ class MemberImporter(FromCOREPOSAPI, importing.model.MemberImporter):
""" """
Importer for member data from CORE POS API. Importer for member data from CORE POS API.
""" """
key = 'id' key = 'number'
supported_fields = [ supported_fields = [
'id',
'number', 'number',
'id',
'customer_uuid', 'customer_uuid',
'joined', 'joined',
'withdrew', 'withdrew',
@ -548,8 +548,8 @@ class MemberImporter(FromCOREPOSAPI, importing.model.MemberImporter):
withdrew = withdrew.date() withdrew = withdrew.date()
return { return {
'id': str(member['cardNo']),
'number': int(member['cardNo']), 'number': int(member['cardNo']),
'id': str(member['customerAccountID']),
'customer_uuid': customer.uuid, 'customer_uuid': customer.uuid,
'joined': joined, 'joined': joined,
'withdrew': withdrew, 'withdrew': withdrew,