Make card_number more central for CORE API -> Rattail importers

let's track that as (effectively) `Customer.corepos_card_number` and
use that when possible for importer key
This commit is contained in:
Lance Edgar 2023-06-05 20:45:45 -05:00
parent c1276c998a
commit bfc52a6fb3
6 changed files with 179 additions and 65 deletions

View file

@ -46,7 +46,9 @@ def get_core_members(config, api, progress=None):
# first we fetch all customer records from CORE DB
with app.short_session(factory=CoreSession) as s:
db_customers = s.query(corepos.CustData).all()
db_customers = s.query(corepos.CustData)\
.order_by(corepos.CustData.card_number)\
.all()
s.expunge_all()
# now we must fetch each customer account individually from API