diff --git a/rattail_corepos/corepos/util.py b/rattail_corepos/corepos/util.py index fd25030..a1e9e89 100644 --- a/rattail_corepos/corepos/util.py +++ b/rattail_corepos/corepos/util.py @@ -2,7 +2,7 @@ ################################################################################ # # Rattail -- Retail Software Framework -# Copyright © 2010-2020 Lance Edgar +# Copyright © 2010-2022 Lance Edgar # # This file is part of Rattail. # @@ -46,7 +46,7 @@ def get_core_members(api, progress=None): # first we fetch all customer records from CORE DB with short_session(Session=CoreSession) as s: - db_customers = s.query(corepos.Customer).all() + db_customers = s.query(corepos.CustData).all() s.expunge_all() # now we must fetch each customer account individually from API @@ -59,7 +59,7 @@ def get_core_members(api, progress=None): if member: members[dbcust.card_number] = member else: - logger = log.warning if dbcust.account_holder else log.debug + logger = log.warning if dbcust.person_number == 1 else log.debug logger("could not fetch member from CORE API: %s", dbcust.card_number)