Fix how customerAccountID is imported from CORE API
geez. also optimize joinedloads when fetching Rattail member data for CORE export
This commit is contained in:
parent
914fcbe192
commit
2ca9cd8f76
2 changed files with 12 additions and 6 deletions
|
@ -172,6 +172,7 @@ class CustomerImporter(FromCOREPOSAPI, corepos_importing.model.CustomerImporter)
|
|||
|
||||
data = {
|
||||
'corepos_card_number': card_number,
|
||||
'corepos_account_id': int(member['customerAccountID']),
|
||||
'number': card_number,
|
||||
'name': normalize_full_name(customer['firstName'],
|
||||
customer['lastName']),
|
||||
|
@ -183,10 +184,6 @@ class CustomerImporter(FromCOREPOSAPI, corepos_importing.model.CustomerImporter)
|
|||
'address_zipcode': member['zip'] or None,
|
||||
}
|
||||
|
||||
if 'corepos_account_id' in self.fields:
|
||||
account_id = customer.get('customerAccountID')
|
||||
data['corepos_account_id'] = int(account_id) if account_id is not None else None
|
||||
|
||||
return data
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue